]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: add the cache tier IO rate in 'ceph -s' 5271/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Mon, 20 Jul 2015 03:31:47 +0000 (11:31 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Mon, 20 Jul 2015 03:31:47 +0000 (11:31 +0800)
This will show the cache tier flush/evict bandwidth and promote IOPS in
the output of the 'ceph -s' command.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/mon/PGMap.cc
src/mon/PGMap.h

index 261dd71fb5ea25d45c651d83ba2aa7bf4d49d0aa..2c08fcc1da6e40ea471d55a89560e6de2cd485d2 100644 (file)
@@ -1224,6 +1224,11 @@ void PGMap::cache_io_rate_summary(Formatter *f, ostream *out,
   }
 }
 
+void PGMap::overall_cache_io_rate_summary(Formatter *f, ostream *out) const
+{
+  cache_io_rate_summary(f, out, pg_sum_delta, stamp_delta);
+}
+
 void PGMap::pool_cache_io_rate_summary(Formatter *f, ostream *out,
                                        uint64_t poolid) const
 {
@@ -1423,6 +1428,13 @@ void PGMap::print_summary(Formatter *f, ostream *out) const
   overall_client_io_rate_summary(f, &ssr);
   if (!f && ssr.str().length())
     *out << "  client io " << ssr.str() << "\n";
+
+  ssr.clear();
+  ssr.str("");
+
+  overall_cache_io_rate_summary(f, &ssr);
+  if (!f && ssr.str().length())
+    *out << "  cache io " << ssr.str() << "\n";
 }
 
 void PGMap::print_oneline_summary(Formatter *f, ostream *out) const
index b89e52a5c3441f91080f07a0237daa2fb17459ca..e1cdf2dea3c9de8293993eab621022503306b831 100644 (file)
@@ -341,6 +341,11 @@ public:
   void cache_io_rate_summary(Formatter *f, ostream *out,
                              const pool_stat_t& delta_sum,
                              utime_t delta_stamp) const;
+  /**
+   * Obtain a formatted/plain output for the overall cache tier IO, which is
+   * calculated resorting to @p pg_sum_delta and @p stamp_delta.
+   */
+  void overall_cache_io_rate_summary(Formatter *f, ostream *out) const;
   /**
    * Obtain a formatted/plain output for cache tier IO over a given pool
    * with id @p pool_id.  We will then obtain pool-specific data