From: Yingxin Cheng Date: Thu, 4 Jul 2024 06:03:30 +0000 (+0800) Subject: crimson/osd: report the average reactor utilization X-Git-Tag: v20.0.0~1533^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d0450f9affc0bf6cb7d9f10238d060b5ea8a094f;p=ceph.git crimson/osd: report the average reactor utilization Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index b2621f0bf8f1e..e75e4b2e36597 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -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] {