aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2023-08-31 14:48:08 +0200
committerGitHub <noreply@github.com>2023-08-31 14:48:08 +0200
commit3c0574dacee144660f87685b86344d9b0292e6b3 (patch)
tree352b9e0aaf0d851cc0c7090e475d6498d723c965 /searchcore
parent95c494d8899a5a0ddf1693e074aa5b555394a683 (diff)
parent027801d93edfac9b172052c65d65a683150d6b2c (diff)
Merge pull request #28323 from vespa-engine/geirst/executor-saturation-metric
Add saturation metric for executors.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
index 7c4dcf434a3..b7079542c06 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
@@ -11,6 +11,7 @@ ExecutorMetrics::update(const vespalib::ExecutorStats &stats)
rejected.inc(stats.rejectedTasks);
wakeupCount.inc(stats.wakeupCount);
util.set(stats.getUtil());
+ saturation.set(stats.get_saturation());
const auto & qSize = stats.queueSize;
queueSize.addValueBatch(qSize.average(), qSize.count(), qSize.min(), qSize.max());
}
@@ -21,6 +22,9 @@ ExecutorMetrics::ExecutorMetrics(const std::string &name, metrics::MetricSet *pa
rejected("rejected", {}, "Number of rejected tasks", this),
wakeupCount("wakeups", {}, "Number of times a worker thread has been woken up", this),
util("utilization", {}, "Ratio of time the worker threads has been active", this),
+ saturation("saturation", {}, "Ratio indicating how saturated the worker threads has been. "
+ "For most executors this ratio is equal to utilization, but for others (e.g SequencedTaskExecutor) "
+ " a higher saturation than utilization indicates a bottleneck in a subset of the worker threads.", this),
queueSize("queuesize", {}, "Size of task queue", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
index af3a27da240..cd6181b108c 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
@@ -15,6 +15,7 @@ struct ExecutorMetrics : metrics::MetricSet
metrics::LongCountMetric rejected;
metrics::LongCountMetric wakeupCount;
metrics::DoubleValueMetric util;
+ metrics::DoubleValueMetric saturation;
metrics::LongAverageMetric queueSize;
void update(const vespalib::ExecutorStats &stats);