Project

General

Profile

Actions

Bug #82062

closed
AD

OSDMap read balance scoring copies the whole map for every replicated pool

Bug #82062: OSDMap read balance scoring copies the whole map for every replicated pool

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

Status:
Backporting
Priority:
Normal
Assignee:
-
Category:
Performance/Resource Usage
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
umbrella, tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Fixed In:
v22.0.0-1491-g4f91e58fcb
Released In:
Upkeep Timestamp:
2026-11-25T14:32:00+00:00

Description

OSDMap::calc_read_balance_score makes a deepish_copy_from of the whole OSDMap and scores the copy, and get_pgs_by_osd, which the score calls for every pool, makes another copy to map the pool's PGs. Nothing changes either copy: every call made on them is const, and deepish_copy_from doesn't copy the CRUSH map anyway.

OSDMap::dump scores every replicated pool, so each dump copies the map twice per replicated pool, including every pg_upmap_items entry. The mgr dumps osd_map under the GIL whenever a Python module asks for it, and the mons do the same for osd dump and osd pool ls detail.

On the map of a Reef cluster with 1,018 OSDs, 173 pools of which 134 are replicated, and 10,108 pg_upmap_items entries, osdmaptool --dump json built from main takes 2.52 s, and 2.05 s without the two copies, with identical output. Most of the rest is mapping every PG of every replicated pool for the scores (tracker 82063 covers leaving them out of the mgr's osd_map getter).

The fix is to use the map itself in both places.


Related issues 2 (2 open — 0 closed)

Copied to RADOS - Backport #83552: umbrella: OSDMap read balance scoring copies the whole map for every replicated poolFix Under ReviewAnthony D'Atri

Actions
Copied to RADOS - Backport #83553: tentacle: OSDMap read balance scoring copies the whole map 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 73044

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

  • Description updated (diff)

LF Updated by Laura Flores 21 days ago Actions #3

PR sent to a QA batch.

LF Updated by Laura Flores 14 days ago Actions #4

PR still in QA.

UB Updated by Upkeep Bot 8 days ago Actions #5

  • Copied to Backport #83552: umbrella: OSDMap read balance scoring copies the whole map for every replicated pool added

UB Updated by Upkeep Bot 8 days ago Actions #6

  • Copied to Backport #83553: tentacle: OSDMap read balance scoring copies the whole map for every replicated pool added

UB Updated by Upkeep Bot 8 days ago Actions #7

  • Status changed from Fix Under Review to Backporting
  • Merge Commit set to 4f91e58fcb3af2135dbdeab54bcb86a72b042b3f
  • Fixed In set to v22.0.0-1491-g4f91e58fcb
  • Upkeep Timestamp set to 2026-11-25T14:32:00+00:00
Actions

Also available in: PDF Atom