From 9a5109a6ab14768f9bad1f7170e8b5f64a3e55e7 Mon Sep 17 00:00:00 2001 From: Chendi Xue Date: Thu, 29 Oct 2015 22:09:40 +0800 Subject: [PATCH] Added option to deploy omap to a separate device(path) 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 --- src/common/config_opts.h | 1 + src/os/filestore/FileStore.cc | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index e0f028f95fb..c2534fd8dce 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -981,6 +981,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) diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index deebd20245d..ba5d877b7f4 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -591,8 +591,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);