]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: tunable prealloc size for ExtentMap inline_bl
authorSage Weil <sage@redhat.com>
Wed, 7 Sep 2016 16:34:57 +0000 (12:34 -0400)
committerSage Weil <sage@redhat.com>
Wed, 7 Sep 2016 16:41:45 +0000 (12:41 -0400)
Otherwise we eat 4KB for every Onode.

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

index e7976f436bec881f8c909fe5fa0efb4a210dccb0..584dad4f310f6034da5525de0e547f86eb4065b8 100644 (file)
@@ -979,6 +979,7 @@ OPTION(bluestore_compression_required_ratio, OPT_DOUBLE, .875)
 OPTION(bluestore_extent_map_shard_max_size, OPT_U32, 1200)
 OPTION(bluestore_extent_map_shard_target_size, OPT_U32, 500)
 OPTION(bluestore_extent_map_shard_min_size, OPT_U32, 150)
+OPTION(bluestore_extent_map_inline_shard_prealloc_size, OPT_U32, 256)
 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, 512*1024*1024)
index f09b22faeaba3096f1f05a110b2439b1cbe5801e..c05f8855bae9e1027b8b071dd76bf7734d80cd49 100644 (file)
@@ -1428,6 +1428,12 @@ ostream& operator<<(ostream& out, const BlueStore::Extent& e)
 #undef dout_prefix
 #define dout_prefix *_dout << "bluestore.extentmap(" << this << ") "
 
+BlueStore::ExtentMap::ExtentMap(Onode *o)
+  : onode(o),
+    inline_bl(g_conf->bluestore_extent_map_inline_shard_prealloc_size) {
+}
+
+
 bool BlueStore::ExtentMap::update(Onode *o, KeyValueDB::Transaction t,
                                  bool force)
 {
index eac753e766b99b29468758e4b05f18ac058c0d3b..61774e8149daaef3b8a473233a0e0279bf842be5 100644 (file)
@@ -546,7 +546,7 @@ public:
     bool inline_dirty = false;
     bufferlist inline_bl;    ///< cached encoded map, if unsharded; empty=>dirty
 
-    ExtentMap(Onode *o) : onode(o) {}
+    ExtentMap(Onode *o);
 
     bool encode_some(uint32_t offset, uint32_t length, bufferlist& bl,
                     unsigned *pn);