Scrubbing options
Ceph ensures data integrity by scrubbing placement groups.
The following are the Ceph scrubbing options that you can adjust to increase or decrease scrubbing operations.
-
mds_max_scrub_ops_in_progress -
Description: The maximum number of scrub operations performed in parallel. You can set this value with ceph config set mds_max_scrub_ops_in_progress VALUE command.
-
osd_max_scrubs -
Description: The maximum number of simultaneous scrub operations for a Ceph OSD Daemon.
-
osd_scrub_begin_hour -
Description: The specific hour at which the scrubbing begins. Along with
osd_scrub_end_hour, you can define a time window in which the scrubs can happen. Useosd_scrub_begin_hour = 0andosd_scrub_end_hour = 0to allow scrubbing the entire day. -
osd_scrub_end_hour -
Description: The specific hour at which the scrubbing ends. Along with
osd_scrub_begin_hour, you can define a time window, in which the scrubs can happen. Useosd_scrub_begin_hour = 0andosd_scrub_end_hour = 0to allow scrubbing for the entire day. -
osd_scrub_begin_week_day -
Description: The specific day on which the scrubbing begins. 0 = Sunday, 1 = Monday, etc. Along with
osd_scrub_end_week_day, you can define a time window in which scrubs can happen. Useosd_scrub_begin_week_day = 0andosd_scrub_end_week_day = 0to allow scrubbing for the entire week. -
osd_scrub_end_week_day -
Description: This defines the day on which the scrubbing ends. 0 = Sunday, 1 = Monday, etc. Along with
osd_scrub_begin_week_day, they define a time window, in which the scrubs can happen. Useosd_scrub_begin_week_day = 0andosd_scrub_end_week_day = 0to allow scrubbing for the entire week. -
osd_scrub_during_recovery -
Description: Allow scrub during recovery. Setting this to
falsedisables scheduling new scrub, and deep-scrub, while there is an active recovery. The already running scrubs continue which is useful to reduce load on busy storage clusters. -
osd_scrub_extended_sleep -
Description: Duration to inject a delay during scrubbing out of scrubbing hours or seconds.
-
osd_scrub_backoff_ratio -
Description: Backoff ratio for scheduling scrubs. This is the percentage of ticks that do NOT schedule scrubs, 66% means that 1 out of 3 ticks schedules scrubs.
-
osd_scrub_load_threshold -
Description: The normalized maximum load. Scrubbing does not happen when the system load, as defined by
getloadavg()/number of online CPUs, is higher than this defined number. -
osd_scrub_min_interval -
Description: The minimal interval in seconds for scrubbing the Ceph OSD daemon when the Ceph storage Cluster load is low.
-
osd_scrub_max_interval -
Description: The maximum interval in seconds for scrubbing the Ceph OSD daemon irrespective of cluster load.
-
osd_scrub_chunk_min -
Description: The minimal number of object store chunks to scrub during a single operation. Ceph blocks writes to a single chunk during scrub.
-
osd_scrub_chunk_max -
Description: The maximum number of object store chunks to scrub during a single operation.
-
osd_scrub_sleep -
Description: Time to sleep before scrubbing the next group of chunks. Increasing this value slows down the overall rate of scrubbing, so that client operations are less impacted.
-
osd_deep_scrub_interval -
Description: The interval for
deepscrubbing, fully reading all data. Theosd_scrub_load_thresholddoes not affect this setting. -
osd_debug_deep_scrub_sleep -
Description: Inject an expensive sleep during deep scrub IO to make it easier to induce preemption.
-
osd_scrub_interval_randomize_ratio -
Description: Add a random delay to
osd_scrub_min_intervalwhen scheduling the next scrub job for a placement group. The delay is a random value less thanosd_scrub_min_interval*osd_scrub_interval_randomized_ratio. The default setting spreads scrubs throughout the allowed time window of[1, 1.5]*osd_scrub_min_interval. -
osd_deep_scrub_stride -
Description: Read size when doing a deep scrub.
-
osd_scrub_auto_repair_num_errors -
Description: Auto repair does not occur if more than this many errors are found.
-
osd_scrub_auto_repair -
Description: Setting this to
trueenables automatic Placement Group (PG) repair when errors are found by scrubs or deep-scrubs. However, if more thanosd_scrub_auto_repair_num_errorserrors are found, a repair is NOT performed. -
osd_scrub_max_preemptions -
Description: Set the maximum number of times you need to preempt a deep scrub due to a client operation before blocking client IO to complete the scrub.
-
osd_deep_scrub_keys -
Description: Number of keys to read from an object at a time during deep scrub.