]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Added option to deploy omap to a separate device(path)
authorChendi Xue <chendi.xue@intel.com>
Thu, 29 Oct 2015 14:09:40 +0000 (22:09 +0800)
committerChendi.Xue <chendi.xue@intel.com>
Thu, 18 Feb 2016 02:24:20 +0000 (10:24 +0800)
In the HDD as OSD, SSD as journal test, we saw a great
throughput improvement if moving omap to a SSD device at
randwrite case.

This patch aim to add a config option 'filestore_omap_backend_path'
for users to configurate omap path before deploy.

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
src/common/config_opts.h
src/os/filestore/FileStore.cc

index de55865b811992896c7f972933e70867e3b2d64c..84d3c6c74419ffee7b71d2d5d05e9955cd96f0d5 100644 (file)
@@ -954,6 +954,7 @@ OPTION(kstore_cache_tails, OPT_BOOL, true)
 OPTION(kstore_default_stripe_size, OPT_INT, 65536)
 
 OPTION(filestore_omap_backend, OPT_STR, "leveldb")
+OPTION(filestore_omap_backend_path, OPT_STR, "")
 
 OPTION(filestore_debug_disable_sharded_check, OPT_BOOL, false)
 
index 548b1d926f75b2285bd5708c9e0ce9e45d7fe23c..79917b096efa811d5841a7a8a3172da186d42de2 100644 (file)
@@ -579,8 +579,12 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, osflagbit
   current_op_seq_fn = sss.str();
 
   ostringstream omss;
-  omss << basedir << "/current/omap";
-  omap_dir = omss.str();
+  if (g_conf->filestore_omap_backend_path != "") {
+      omap_dir = g_conf->filestore_omap_backend_path;
+  } else {
+      omss << basedir << "/current/omap";
+      omap_dir = omss.str();
+  }
 
   // initialize logger
   PerfCountersBuilder plb(g_ceph_context, internal_name, l_os_first, l_os_last);