From 7a73d9b155bdd9e8cfffbf4968e57e4fbd95ac65 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 22 Feb 2018 13:15:17 -0600 Subject: [PATCH] os/bluestore: bluestore_cache_kv_max -> bluestore_cache_kv_min Currently, the default tunables are cache_meta_ratio = .01 cache_kv_ratio = .99 cache_kv_max = 512MB We currently have no doubts that, for low memory situations, we want to give all of the memory to rocksdb. The .99/.01 values are an indirect way to communicating that. However, we do see problems with high-memory situations where rocksdb needs more than 512MB (due to, we believe, bloom filters). And it is very reasonable to think that there are situations and reasons why we might want more than 512MB for rocksdb. So, we change kv_max -> kv_min. For low memory situations, we give *all* memory to rocksdb. (If you don't want this, set kv_min = 0.) Above that, respect the kv_ratio and meta_ratio settings. I don't see much reason to have an absolute kv_max on the rocksdb memory. We adjust the kv_ratio and meta_ratio defaults in this patch so that all high memory goes to bluestore and there is no effective change in default behavior for this patch. Signed-off-by: Sage Weil --- src/common/legacy_config_opts.h | 2 +- src/common/options.cc | 15 ++++++++----- src/os/bluestore/BlueStore.cc | 38 +++++++++++++++++---------------- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 77828795fe6db..cb3aeadbc94fa 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1034,7 +1034,7 @@ OPTION(bluestore_cache_size_hdd, OPT_U64) OPTION(bluestore_cache_size_ssd, OPT_U64) OPTION(bluestore_cache_meta_ratio, OPT_DOUBLE) OPTION(bluestore_cache_kv_ratio, OPT_DOUBLE) -OPTION(bluestore_cache_kv_max, OPT_INT) // limit the maximum amount of cache for the kv store +OPTION(bluestore_cache_kv_min, OPT_INT) OPTION(bluestore_kvbackend, OPT_STR) OPTION(bluestore_allocator, OPT_STR) // stupid | bitmap OPTION(bluestore_freelist_blocks_per_key, OPT_INT) diff --git a/src/common/options.cc b/src/common/options.cc index 6d012c8a5edd1..150042503e1d2 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3735,19 +3735,24 @@ std::vector