]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: default to 512MB cache, buffered reads
authorSage Weil <sage@redhat.com>
Sun, 19 Jun 2016 14:14:11 +0000 (10:14 -0400)
committerSage Weil <sage@redhat.com>
Wed, 22 Jun 2016 15:28:42 +0000 (11:28 -0400)
Test with small cache to exercise trimming.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/os/bluestore/BlueStore.cc
src/test/objectstore/store_test.cc

index 854d834e1f3d6db7dc60cd8e56be96ec129e075f..068d7d5f0236d88e5fcee8058c4412294d713845 100644 (file)
@@ -966,7 +966,7 @@ OPTION(bluestore_compression_min_blob_size, OPT_U32, 256*1024)
 OPTION(bluestore_compression_max_blob_size, OPT_U32, 4*1024*1024)
 OPTION(bluestore_cache_type, OPT_STR, "2q")   // lru, 2q
 OPTION(bluestore_onode_cache_size, OPT_U32, 16*1024)
-OPTION(bluestore_buffer_cache_size, OPT_U32, 256*1024*1024)
+OPTION(bluestore_buffer_cache_size, OPT_U32, 512*1024*1024)
 OPTION(bluestore_cache_tails, OPT_BOOL, true)   // cache tail blocks in Onode
 OPTION(bluestore_kvbackend, OPT_STR, "rocksdb")
 OPTION(bluestore_allocator, OPT_STR, "stupid")  // or "bitmap"
@@ -989,7 +989,7 @@ OPTION(bluestore_nid_prealloc, OPT_INT, 1024)
 OPTION(bluestore_overlay_max_length, OPT_INT, 65536)
 OPTION(bluestore_overlay_max, OPT_INT, 0)
 OPTION(bluestore_clone_cow, OPT_BOOL, false)  // do copy-on-write for clones
-OPTION(bluestore_default_buffered_read, OPT_BOOL, false)
+OPTION(bluestore_default_buffered_read, OPT_BOOL, true)
 OPTION(bluestore_debug_misc, OPT_BOOL, false)
 OPTION(bluestore_debug_no_reuse_blocks, OPT_BOOL, false)
 OPTION(bluestore_debug_small_allocations, OPT_INT, 0)
index c255e0b852bb908990368fc16b925dfdfe3178ff..6558c61e192c69e8d0da058f9380c651541612aa 100644 (file)
@@ -538,7 +538,7 @@ void BlueStore::LRUCache::trim(uint64_t onode_max, uint64_t buffer_max)
               << " refs; stopping with " << num << " left to trim" << dendl;
       break;
     }
-    dout(30) << __func__ << "  trim " << o->oid << dendl;
+    dout(30) << __func__ << "  rm " << o->oid << dendl;
     if (p != onode_lru.begin()) {
       onode_lru.erase(p--);
     } else {
index 33ea9ffc1a1c4fc333943dcbd0db8b087fc7ba5a..d1efd2f9bd95d7b5cd357b9db1e9e49f99f33425 100644 (file)
@@ -4827,6 +4827,11 @@ int main(int argc, char **argv) {
   g_ceph_context->_conf->set_val("bluestore_debug_freelist", "true");
   g_ceph_context->_conf->set_val("bluestore_clone_cow", "true");
   g_ceph_context->_conf->set_val("bluestore_max_alloc_size", "196608");
+
+  // set small cache sizes so we see trimming during Synthetic tests
+  g_ceph_context->_conf->set_val("bluestore_buffer_cache_size", "2000000");
+  g_ceph_context->_conf->set_val("bluestore_onode_cache_size", "500");
+
   g_ceph_context->_conf->set_val(
     "enable_experimental_unrecoverable_data_corrupting_features", "*");
   g_ceph_context->_conf->apply_changes(NULL);