]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: report the average reactor utilization
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 4 Jul 2024 06:03:30 +0000 (14:03 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Thu, 4 Jul 2024 06:03:30 +0000 (14:03 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/osd/osd.cc

index b2621f0bf8f1e225782d0e584108ba85daac22d9..e75e4b2e36597498e07547c38b1912f843bc1bb8 100644 (file)
@@ -411,11 +411,16 @@ seastar::future<> OSD::start()
             shard_stats[seastar::this_shard_id()] = stats;
           }).then([this, FNAME] {
             std::ostringstream oss;
+            double agg_ru = 0;
+            int cnt = 0;
             for (const auto &stats : shard_stats) {
+              agg_ru += stats.reactor_utilization;
+              ++cnt;
               oss << int(stats.reactor_utilization);
               oss << ",";
             }
-            INFO("reactor_utilizations: {}", oss.str());
+            INFO("reactor_utilizations: {}({})",
+                 int(agg_ru/cnt), oss.str());
           });
         });
         gate.dispatch_in_background("stats_store", *this, [this] {