]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph::buffer, Add cached_crc and cached_crc_adjust count in perf dump 6535/head
authorNing Yao <zay11022@gmail.com>
Wed, 11 Nov 2015 10:34:51 +0000 (18:34 +0800)
committerNing Yao <zay11022@gmail.com>
Mon, 30 Nov 2015 07:27:43 +0000 (15:27 +0800)
in order to track the hit rate and efficiency of crc_cache

Signed-off-by: Ning Yao <zay11022@gmail.com>
src/osd/OSD.cc
src/osd/OSD.h

index c47aa5fb9785d0fc333f0cd573e19c20c6fdb28c..7425cc7e6b6e284aa6c6d66af8b4625d3181b7f4 100644 (file)
@@ -2244,6 +2244,8 @@ void OSD::create_logger()
   osd_plb.add_u64(l_osd_buf, "buffer_bytes", "Total allocated buffer size");       // total ceph::buffer bytes
   osd_plb.add_u64(l_osd_history_alloc_bytes, "history_alloc_Mbytes");       // total ceph::buffer bytes in history
   osd_plb.add_u64(l_osd_history_alloc_num, "history_alloc_num");       // total ceph::buffer num in history
+  osd_plb.add_u64(l_osd_cached_crc, "cached_crc", "Total number getting crc from crc_cache"); // total ceph::buffer buffer_cached_crc_adjusted
+  osd_plb.add_u64(l_osd_cached_crc_adjusted, "cached_crc_adjusted", "Total number getting crc from crc_cache with adjusting"); // total ceph::buffer buffer_cached_crc_adjusted
 
   osd_plb.add_u64(l_osd_pg, "numpg", "Placement groups");   // num pgs
   osd_plb.add_u64(l_osd_pg_primary, "numpg_primary", "Placement groups for which this osd is primary"); // num primary pgs
@@ -3962,6 +3964,8 @@ void OSD::tick()
   logger->set(l_osd_buf, buffer::get_total_alloc());
   logger->set(l_osd_history_alloc_bytes, SHIFT_ROUND_UP(buffer::get_history_alloc_bytes(), 20));
   logger->set(l_osd_history_alloc_num, buffer::get_history_alloc_num());
+  logger->set(l_osd_cached_crc, buffer::get_cached_crc());
+  logger->set(l_osd_cached_crc_adjusted, buffer::get_cached_crc_adjusted());
 
   if (is_active() || is_waiting_for_healthy()) {
     map_lock.get_read();
@@ -5947,6 +5951,8 @@ void OSD::_dispatch(Message *m)
   logger->set(l_osd_buf, buffer::get_total_alloc());
   logger->set(l_osd_history_alloc_bytes, SHIFT_ROUND_UP(buffer::get_history_alloc_bytes(), 20));
   logger->set(l_osd_history_alloc_num, buffer::get_history_alloc_num());
+  logger->set(l_osd_cached_crc, buffer::get_cached_crc());
+  logger->set(l_osd_cached_crc_adjusted, buffer::get_cached_crc_adjusted());
 
   switch (m->get_type()) {
 
index 094d7d6fd277eacee077adeb3bdb7cc87e566cac..367d236c059b4c47cd50b2a8b36f7657385d3e64 100644 (file)
@@ -112,6 +112,8 @@ enum {
   l_osd_buf,
   l_osd_history_alloc_bytes,
   l_osd_history_alloc_num,
+  l_osd_cached_crc,
+  l_osd_cached_crc_adjusted,
 
   l_osd_pg,
   l_osd_pg_primary,