From: xie xingguo Date: Fri, 23 Feb 2018 03:39:13 +0000 (+0800) Subject: osd/PG: decay scrub_chunk_max too if scrub is preempted X-Git-Tag: v12.2.6~98^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cdbf3242dc8921f534ec93e4ee5517460f7ba36f;p=ceph.git 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) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 0641e59913e8..f4144cb7fe5b 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;