Feature #6735

scrub documentation needs to be improved (see below conversation or as Sam)

Added by Samuel Just almost 6 years ago. Updated almost 6 years ago.

Target version:
Start date:
Due date:
% Done:


Affected Versions:
Pull request ID:


(12:55:58 PM) : I think I might be missing something,

What happens in the case that scrub_should_schedule() is false?
(12:56:45 PM) : Oh, I see 4810 now...
(12:56:48 PM) : nvm
(01:51:06 PM) : trying to track the entire scrub process right now, it looks like osd_scrub_load_threshold is only used when scrubs scheduled with sched_scrub(), it seems there are scrubbing methods that do not go through sched_scrub() which means scrubs occur without looking at osd_scrub_load_threshold. Does that sound correct?
(01:51:29 PM) /home: yeah, specifically, when the user has requested one manually
(01:53:01 PM) : yeah, it seems there is a case where deep scrubs are occurring (without been ran manually) regardless of osd_scrub_load_threshold
(01:53:27 PM) /home: well, there is an upper limit which forces them regardless of threshold, I think
(01:53:46 PM) /home: max_interval
(01:53:52 PM) /home: osd_scrub_max_interval
(01:54:04 PM) : that apply to deep scrubs too?
(01:54:08 PM) /home: I guess so
(01:54:24 PM) : there is this, osd deep scrub interval, which is 1 week, while osd_scrub_max_interval is one day
(01:55:02 PM) /home: it determines deep regardless of load
(01:55:03 PM) /home: apparently
(01:55:24 PM) /home: it determines whether to do a normal scrub based on the min and max intervals
(01:55:34 PM) /home: and then promotes it to a deep scrub strictly if it's been longer than a week
(01:55:52 PM) : interesting
(01:56:07 PM) /home: I think you should suggest he make the osd_scrub_max_interval really really big
(01:56:10 PM) : this behavior makes sense now though.
(01:56:13 PM) : yes
(01:56:17 PM) /home: that way, it simply won't scrub at all under load
(01:56:32 PM) /home: urgh, this conversation needs to become docs
(01:56:33 PM) /home: making bug
(01:56:48 PM) : perfect, gunna make sure I can follow all this through the code too
(01:56:57 PM) /home: yep
(01:57:20 PM) : osd scrub load threshold has a doc error too..
(01:57:25 PM) /home: oh
(01:57:26 PM) : Description:
The maximum CPU load. Ceph will not scrub when the CPU load is higher than this number. Default is 50%.

(01:57:27 PM) /home: what kind?
(01:57:36 PM) : 50% is very missleading
(01:57:41 PM) /home: ah

Associated revisions

Revision 740d406e (diff)
Added by John Wilkins almost 6 years ago

doc: Clarified description on scrub load threshold.

fixes: #6735

Signed-off-by: John Wilkins <>


#1 Updated by John Wilkins almost 6 years ago

  • Assignee set to John Wilkins

#2 Updated by John Wilkins almost 6 years ago

  • Status changed from New to In Progress

#3 Updated by John Wilkins almost 6 years ago

  • Status changed from In Progress to Resolved

#4 Updated by David Zafman almost 6 years ago

These 2 defaults in the doc don't match the defaults in the code:

OPTION(osd_scrub_min_interval, OPT_FLOAT, 60*60*24)    // if load is low
OPTION(osd_scrub_max_interval, OPT_FLOAT, 7*60*60*24)  // regardless of load

Also available in: Atom PDF