os/bluestore: default to 512MB cache, buffered reads

Test with small cache to exercise trimming.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-06-19 10:14:11 -04:00
parent f1d7a70614
commit d2023cf3b4
3 changed files with 8 additions and 3 deletions

View 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)

View 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 {

View 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);