]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: add counter to trace blob splitting
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 1 Nov 2016 03:32:49 +0000 (11:32 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 1 Nov 2016 10:37:21 +0000 (18:37 +0800)
As we want to know if it really happens and how often does it happen.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index c448185167d83b3142c7b5ac662592e60f6c1ee6..019c712f77a07951c99bccfd0cb5ab7290ebd325 100644 (file)
@@ -1676,6 +1676,7 @@ void BlueStore::ExtentMap::reshard(Onode *o, uint64_t min_alloc_size)
                // switch b to the new right-hand side, in case it
                // *also* has to get split.
                bstart += blob_offset;
+               onode->c->store->logger->inc(l_bluestore_blob_split);
              } else {
                must_span = true;
                break;
@@ -2683,8 +2684,12 @@ void BlueStore::_init_logger()
   b.add_u64(l_bluestore_txc, "bluestore_txc", "Transactions committed");
   b.add_u64(l_bluestore_onode_reshard, "bluestore_onode_reshard",
            "Onode extent map reshard events");
-  b.add_u64(l_bluestore_gc, "bluestore_gc", "Sum for garbage collection reads");
-  b.add_u64(l_bluestore_gc_bytes, "bluestore_gc_bytes", "garbage collected bytes");
+  b.add_u64(l_bluestore_gc, "bluestore_gc",
+            "Sum for garbage collection reads");
+  b.add_u64(l_bluestore_gc_bytes, "bluestore_gc_bytes",
+            "garbage collected bytes");
+  b.add_u64(l_bluestore_blob_split, "bluestore_blob_split",
+            "Sum for blob splitting due to resharding");
   logger = b.create_perf_counters();
   g_ceph_context->get_perfcounters_collection()->add(logger);
 }
index 8fc92167575755a647fcd9adcf8ae8dc9194e1f9..4afffd760d2cadba55076ff030a8de478e25b0ff 100644 (file)
@@ -94,6 +94,7 @@ enum {
   l_bluestore_onode_reshard,
   l_bluestore_gc,
   l_bluestore_gc_bytes,
+  l_bluestore_blob_split,
   l_bluestore_last
 };