]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: make scrub chunk size tunable 350/head
authorSage Weil <sage@inktank.com>
Fri, 7 Jun 2013 22:16:42 +0000 (15:16 -0700)
committerSage Weil <sage@inktank.com>
Fri, 7 Jun 2013 23:10:53 +0000 (16:10 -0700)
It was hard-coded at 5.  Make it range from 5-15 by default, for now.

We should still keep this smallish since this range is locked for the
duration of the scrub on this chunk.

Signed-off-by: Sage Weil <sage@inktank.com>
src/common/config_opts.h
src/osd/PG.cc

index a6b380b0b409b420fd64807b6abe12fc44ad1537..b6b9e17fde988362918baf0ffcf7239017194afb 100644 (file)
@@ -426,6 +426,8 @@ OPTION(osd_max_scrubs, OPT_INT, 1)
 OPTION(osd_scrub_load_threshold, OPT_FLOAT, 0.5)
 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
+OPTION(osd_scrub_chunk_min, OPT_INT, 5)
+OPTION(osd_scrub_chunk_max, OPT_INT, 25)
 OPTION(osd_deep_scrub_interval, OPT_FLOAT, 60*60*24*7) // once a week
 OPTION(osd_deep_scrub_stride, OPT_INT, 524288)
 OPTION(osd_scan_list_ping_tp_interval, OPT_U64, 100)
index 929f37ab9815af73405c0b737080cff39c029087..24f7430d16885a09b7e4e357bb07ef5a9dce8521 100644 (file)
@@ -3658,7 +3658,9 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
           while (!boundary_found) {
             vector<hobject_t> objects;
             ret = osd->store->collection_list_partial(coll, start,
-                                                      5, 5, 0,
+                                                      g_conf->osd_scrub_chunk_min,
+                                                     g_conf->osd_scrub_chunk_max,
+                                                     0,
                                                       &objects, &scrubber.end);
             assert(ret >= 0);