Feature #81954
closedtest/mgr: fake OSDs for mgr scale testing
0%
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
- 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
- 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