Project

General

Profile

Actions

Bug #82063

closed
AD

The mgr osd_map getter computes a read balance score for every replicated pool

Bug #82063: The mgr osd_map getter computes a read balance score for every replicated pool

Added by Anthony D'Atri about 1 month ago. Updated 15 days ago.

Status:
Backporting
Priority:
Normal
Assignee:
-
Category:
python interface
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
umbrella,tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v22.0.0-689-g6461ceabd7
Released In:
Upkeep Timestamp:
2026-11-11T08:51:32+00:00

Description

The mgr's osd_map getter calls OSDMap::dump, which computes a read balance score for every replicated pool. Each score maps every PG of the pool, and before #82062's fix it also copied the whole map. The mgr does this under the GIL every time a Python module asks for osd_map, so all Python modules stall for that long.

On a Reef 18.2.8 cluster with 1,018 OSDs, 134 replicated pools and 10,108 pg_upmap_items entries, osdmaptool --dump json of the same map takes 2.55 s with Reef and 0.09 s with Quincy, which has no read balance score. The prometheus module reads osd_map twice per collection there, and the mgr stops dispatching messages for about 7 s each time. rbd_support reads it twice a minute.

No mgr module needs the scores from osd_map:
  • The balancer, the only module that uses them, gets them from get_osdmap().dump(), which is unchanged.
  • The dashboard passes every pool field through /api/pool, including read_balance, but neither its UI nor its OpenAPI spec uses it.
  • ceph osd dump and ceph osd pool ls detail are served by the mons and are unchanged.

The fix is to leave the scores out of the osd_map getter.


Related issues 2 (2 open — 0 closed)

Copied to mgr - Backport #83037: umbrella: The mgr osd_map getter computes a read balance score for every replicated poolFix Under ReviewAnthony D'Atri

Actions
Copied to mgr - Backport #83038: tentacle: The mgr osd_map getter computes a read balance score for every replicated poolFix Under ReviewAnthony D'Atri

Actions

AD Updated by Anthony D'Atri about 1 month ago Actions #1

  • Status changed from New to Fix Under Review
  • Pull request ID set to 73045

ID Updated by Ilya Dryomov 22 days ago Actions #2

  • Backport changed from umbrella, tentacle to umbrella, tentacle, squid

UB Updated by Upkeep Bot 22 days ago Actions #3

  • Copied to Backport #83037: umbrella: The mgr osd_map getter computes a read balance score for every replicated pool added

UB Updated by Upkeep Bot 22 days ago Actions #4

  • Copied to Backport #83038: tentacle: The mgr osd_map getter computes a read balance score for every replicated pool added

UB Updated by Upkeep Bot 22 days ago Actions #5

  • Status changed from Fix Under Review to Backporting
  • Merge Commit set to 6461ceabd7f02b6724fb3d92eca994124694cadf
  • Fixed In set to v22.0.0-689-g6461ceabd7
  • Upkeep Timestamp set to 2026-11-11T08:51:32+00:00

AD Updated by Anthony D'Atri 15 days ago Actions #6

  • Backport changed from umbrella, tentacle, squid to umbrella,tentacle
Actions

Also available in: PDF Atom