Scrub scheduler: jitter and the night window
In the book: Chapter 7
Scrub scheduler: jitter and the night window
Draw scrub times for a group of PGs and see how the allowed-hour window delays them; compare uniform shallow jitter with the clipped normal distribution of deep scrubs.
Blue: randomized target · orange: first allowed time; the joining line is the window delay. Faint hours are outside the window; hours use the OSD's local time. Ceph's default start and end are 0 and 0 (all day); this lab starts with a 22–6 window.
osd_scrub_max_interval is not the randomized target; PG_NOT_SCRUBBED is not raised immediately after the target either. A successful deep scrub also updates last_scrub_stamp.
Follows:
src/osd/scrubber/scrub_job.cc :: adjust_shallow_schedule, adjust_deep_scheduleTarget-time distributionssrc/osd/scrubber/osd_scrub.cc :: isbetween_modulo, scrub_time_permitHalf-open hour windowssrc/common/options/osd.yaml.in :: osd_scrub_*Scheduling options