]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: increase default leveldb write buffer, cache size
authorSage Weil <sage@inktank.com>
Sun, 23 Feb 2014 18:05:39 +0000 (10:05 -0800)
committerSage Weil <sage@inktank.com>
Sun, 23 Feb 2014 18:05:39 +0000 (10:05 -0800)
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 <onlyjob@member.fsf.org>
Signed-off-by: Sage Weil <sage@inktank.com>
PendingReleaseNotes
src/common/config_opts.h

index 22a8cbdb2c1b7d8371be07b1180dc25855b75e0c..1dfd118588a6621868ea8c7cef69c0748736b3b7 100644 (file)
@@ -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
 -----
-
index 7b8b74aa05a197c5edb014adf1c6c476aface07b..3549e5465ecdadaca48c90cee5c039f78e2a9943 100644 (file)
@@ -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