]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PG: decay scrub_chunk_max too if scrub is preempted
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 23 Feb 2018 03:39:13 +0000 (11:39 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 23 Feb 2018 03:47:54 +0000 (11:47 +0800)
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 <xie.xingguo@zte.com.cn>
src/osd/PG.cc

index 5662e8434329fb7325198f8245812c8e0505b05c..b3abd76d31b681a5ab6414f199a25427f40f5231 100644 (file)
@@ -4646,7 +4646,8 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
           */
          int min = std::max<int64_t>(3, cct->_conf->osd_scrub_chunk_min /
                                      scrubber.preempt_divisor);
-         int max = std::max<int64_t>(min, cct->_conf->osd_scrub_chunk_max);
+         int max = std::max<int64_t>(min, cct->_conf->osd_scrub_chunk_max /
+                                      scrubber.preempt_divisor);
           hobject_t start = scrubber.start;
          hobject_t candidate_end;
          vector<hobject_t> objects;