Project

General

Profile

Actions

Bug #81783

open
AD

mgr/rbd_support: schedule handlers dump the whole OSDMap every minute to list RBD pools

Bug #81783: mgr/rbd_support: schedule handlers dump the whole OSDMap every minute to list RBD pools

Added by Anthony D'Atri about 2 months ago. Updated about 2 months ago.

Status:
Fix Under Review
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):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

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 Actions #1

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

Also available in: PDF Atom