Bug #82064
openEvery OSD purged snaps scrub creates a new OSDMap epoch
0%
Description
Each OSD scrubs its purged snaps every osd_scrub_min_interval, plus up to osd_scrub_interval_randomize_ratio of that, and reports when it last did in every beacon. OSDMonitor::prepare_beacon proposes a new OSDMap epoch every time that stamp moves, so a cluster makes one epoch per OSD per scrub interval, about every 30 hours with the defaults.
osd_xinfo_t::last_purged_snaps_scrub is only encoded, decoded and printed by osd dump. The epochs still cost what any epoch costs:
- every OSD and client receives and applies the incremental, and the mons store it and later trim it
- the mgr rebuilds
osd_mapfor its Python modules, which takes seconds under the GIL on large clusters, see #82062 and #82063 - on main, each epoch also empties MgrMapCache
On a Reef 18.2.8 cluster with 1,018 OSDs, days with no data movement and no OSD up or down changes have 790 to 920 epochs. Comparing 133 consecutive epochs field by field, everything that wasn't backfill was a single OSD's last_purged_snaps_scrub changing. 1,018 OSDs every 1.25 days on average is about 815 epochs a day. On that cluster each epoch makes the mgr's Python modules stall for 2.5 s or more.
The fix is to record the stamp in the pending incremental without proposing, so it goes out with the next map change. The OSD resends it in every beacon in case that incremental is lost.
AD Updated by Anthony D'Atri about 1 month ago
- Status changed from New to Fix Under Review
- Pull request ID set to 73046