]> git.apps.os.sepia.ceph.com Git - ceph.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)
committerDavid Zafman <dzafman@redhat.com>
Fri, 18 May 2018 16:37:57 +0000 (09:37 -0700)
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>
(cherry picked from commit a9260524676ac28742e5a945de93b87ae985017e)

src/osd/PG.cc

index 0641e59913e829c19c6ef0c34ad3e445da48d177..f4144cb7fe5ba5f92bcb4afb35c8b76bd9d8384a 100644 (file)
@@ -4662,7 +4662,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;