Bug #81783
openmgr/rbd_support: schedule handlers dump the whole OSDMap every minute to list RBD pools
0%
Description
The mirror snapshot and trash purge schedule handlers in rbd_support each call get_rbd_pools() about once a minute, from Schedules.load() and their refresh loops, even when no schedules exist. get_rbd_pools() fetches osd_map only to read pool ids, names and applications.
Dumping osd_map holds the GIL while it converts every OSD and every pg_upmap_items entry to Python objects. It also computes a read balance score for each replicated pool, and each of those copies the OSDMap and maps every PG of the pool through CRUSH.
On a Reef 18.2.8 cluster with 10,130 pg_upmap_items entries, timing a Python module command and a C++ mgr command once a second showed Python module commands stalling for about 6 seconds every 66 seconds, lined up with these calls. C++ commands were unaffected.
The same code is in main.
Fix: add an osd_map_pools getter that dumps the pools section of osd_map without the read balance scores, and use it in get_rbd_pools() and TaskHandler.resolve_pool_name().
AD Updated by Anthony D'Atri about 2 months ago
- Status changed from New to Fix Under Review
- Pull request ID set to 72719