From bcc18d4877cc7ecf0476c1ddfa85aa36ece5697a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 23 Feb 2014 10:05:39 -0800 Subject: [PATCH] osd: increase default leveldb write buffer, cache size The FileStore's leveldb currently uses libleveldb's defaults for cache and write buffer size, which are both 4 MB. Increase the cache size to 128MB and the write buffer to 8MB. Tested-by: Dmitry Smirnov Signed-off-by: Sage Weil --- PendingReleaseNotes | 15 ++++++++++++++- src/common/config_opts.h | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 22a8cbdb2c1b7..1dfd118588a66 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -1,3 +1,16 @@ +v0.78 firefly +------------- + +* The default leveldb cache size for the ceph-osd daemon has been + increased from 4 MB to 128 MB. This will increase the memory + footprint of that process but tends to increase performance of omap + (key/value) objects (used for CephFS and the radosgw). If memory in your + deployment is tight, you can preserve the old behavio by adding:: + + leveldb write buffer size = 0 + leveldb cache size = 0 + + to your ceph.conf to get back the (leveldb) defaults. + v0.79 ----- - diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 7b8b74aa05a19..3549e5465ecda 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -537,8 +537,8 @@ OPTION(osd_leveldb_log, OPT_STR, "") // enable OSD leveldb log file // determines whether PGLog::check() compares written out log to stored log OPTION(osd_debug_pg_log_writeout, OPT_BOOL, false) -OPTION(leveldb_write_buffer_size, OPT_U64, 0) // leveldb write buffer size -OPTION(leveldb_cache_size, OPT_U64, 0) // leveldb cache size +OPTION(leveldb_write_buffer_size, OPT_U64, 8 *1024*1024) // leveldb write buffer size +OPTION(leveldb_cache_size, OPT_U64, 128 *1024*1024) // leveldb cache size OPTION(leveldb_block_size, OPT_U64, 0) // leveldb block size OPTION(leveldb_bloom_size, OPT_INT, 0) // leveldb bloom bits per entry OPTION(leveldb_max_open_files, OPT_INT, 0) // leveldb max open files -- 2.39.5