Bug #82063
closedThe mgr osd_map getter computes a read balance score for every replicated pool
0%
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.
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, includingread_balance, but neither its UI nor its OpenAPI spec uses it. ceph osd dumpandceph osd pool ls detailare served by the mons and are unchanged.
The fix is to leave the scores out of the osd_map getter.
AD Updated by Anthony D'Atri about 1 month ago
- Status changed from New to Fix Under Review
- Pull request ID set to 73045
ID Updated by Ilya Dryomov 22 days ago
- Backport changed from umbrella, tentacle to umbrella, tentacle, squid
UB Updated by Upkeep Bot 22 days ago
- 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
- 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
- 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
- Backport changed from umbrella, tentacle, squid to umbrella,tentacle