]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cache-tier: Allow to config eviction check max size 6997/head
authorYuan Zhou <yuan.zhou@intel.com>
Mon, 21 Dec 2015 07:30:44 +0000 (15:30 +0800)
committerYuan Zhou <yuan.zhou@intel.com>
Mon, 21 Dec 2015 07:33:21 +0000 (15:33 +0800)
This patch adds the option for eviction check size in cache-tier.
On a busy setup, it's better to check bigger number of objects so
the eviction is faster.

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
src/common/config_opts.h
src/osd/ReplicatedPG.cc

index f7c085718f6a4423165aac2d3973844a57461489..0c53079acffafc23bdb6ffc0e88ab5c1c560cf02 100644 (file)
@@ -596,6 +596,7 @@ OPTION(osd_pool_default_cache_target_dirty_high_ratio, OPT_FLOAT, .6)
 OPTION(osd_pool_default_cache_target_full_ratio, OPT_FLOAT, .8)
 OPTION(osd_pool_default_cache_min_flush_age, OPT_INT, 0)  // seconds
 OPTION(osd_pool_default_cache_min_evict_age, OPT_INT, 0)  // seconds
+OPTION(osd_pool_default_cache_max_evict_check_size, OPT_INT, 10)  // max size to check for eviction
 OPTION(osd_hit_set_min_size, OPT_INT, 1000)  // min target size for a HitSet
 OPTION(osd_hit_set_max_size, OPT_INT, 100000)  // max target size for a HitSet
 OPTION(osd_hit_set_namespace, OPT_STR, ".ceph-internal") // rados namespace for hit_set tracking
index 9d1639a518d1519a96e6712dc7505cc010e9ba7a..49e973eee2b2ebd236f48357f3f934d89ed973c3 100644 (file)
@@ -11474,7 +11474,7 @@ bool ReplicatedPG::agent_work(int start_max, int agent_flush_quota)
   assert(base_pool);
 
   int ls_min = 1;
-  int ls_max = 10; // FIXME?
+  int ls_max = cct->_conf->osd_pool_default_cache_max_evict_check_size;
 
   // list some objects.  this conveniently lists clones (oldest to
   // newest) before heads... the same order we want to flush in.