Project

General

Profile

Actions

Feature #81954

closed
NM NM

test/mgr: fake OSDs for mgr scale testing

Feature #81954: test/mgr: fake OSDs for mgr scale testing

Added by Nitzan Mordechai about 1 month ago. Updated 28 days ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Tags (freeform):
Fixed In:
v22.0.0-470-g06c8e00735
Released In:
Upkeep Timestamp:
2026-11-05T14:13:14+00:00

Description

Testing the mgr at scale (hundreds of OSDs, tens of thousands of PGs) needs a large cluster today, and a vstart cluster can't run that many real OSDs on one host.

This adds ceph_test_mgr_fake_osd, a lightweight fake OSD. It boots into the osdmap like a real OSD (MOSDBoot, beacons, PG create acks) and reports PG and OSD stats to the mgr through MgrClient. It has no object store, peering or heartbeats. Each fake reports the PGs it's acting primary for as active+clean, at about 115MB RSS per process, so one host can run a few hundred of
them.

src/test/mgr/fake-osd-cluster.sh wraps it:
- start [--osds N] [--pgs N] [--pool-size N] [--max-backfill-secs SECS]: starts a 1 mon / 1 mgr vstart cluster, launches the fakes and creates a pool, then waits until all PGs are active+clean.
- add N, out N, in, status, stop [--all].
- --max-backfill-secs: a moved PG reports backfilling for a random 0 to N seconds before it goes clean, so the progress module and the PG health code have recovery to track.
- progress: marks a share of the OSDs out and back in, and reports mgr CPU, RSS, progress events and ceph progress latency.
- stats: runs the mgr at several mgr_stats_period values and reports CPU, OSD messages/s, throttle use, ceph pg stat latency and the busiest threads.

Problems this has found so far:
- send_report holds the ClusterState lock for ~0.5s per report in PGMap::apply_incremental (separate tracker: https://tracker.ceph.com/issues/81953)
- pg_autoscaler dumps the osdmap 5 times per loop, causing long GIL stalls
- with allow_pg_recovery_event on, progress dumps 2 osdmaps every 5s even when idle
- ceph config rm of a mgr module option keeps the old value until the mgr restarts

NM Updated by Nitzan Mordechai about 1 month ago Actions #1

  • Status changed from New to Fix Under Review
  • Assignee set to Nitzan Mordechai
  • Pull request ID set to 72728

UB Updated by Upkeep Bot 28 days ago Actions #2

  • Status changed from Fix Under Review to Resolved
  • Merge Commit set to 06c8e007352734de07a5dfe77e9b324df5793d88
  • Fixed In set to v22.0.0-470-g06c8e00735
  • Upkeep Timestamp set to 2026-11-05T14:13:14+00:00
Actions

Also available in: PDF Atom