From cdbf3242dc8921f534ec93e4ee5517460f7ba36f Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Fri, 23 Feb 2018 11:39:13 +0800 Subject: [PATCH] osd/PG: decay scrub_chunk_max too if scrub is preempted In normal case we'll at least scrub as many objects as osd_scrub_chunk_max specified at a time, so the current backoff mechanism should have very limit effect. Decay both osd_scrub_chunk_min and osd_scrub_chunk_max should instead be a better resolution. Signed-off-by: xie xingguo (cherry picked from commit a9260524676ac28742e5a945de93b87ae985017e) --- src/osd/PG.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 0641e59913e82..f4144cb7fe5ba 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4662,7 +4662,8 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) */ int min = std::max(3, cct->_conf->osd_scrub_chunk_min / scrubber.preempt_divisor); - int max = std::max(min, cct->_conf->osd_scrub_chunk_max); + int max = std::max(min, cct->_conf->osd_scrub_chunk_max / + scrubber.preempt_divisor); hobject_t start = scrubber.start; hobject_t candidate_end; vector objects; -- 2.39.5