diff options
author | Geir Storli <geirst@yahooinc.com> | 2023-08-31 11:46:16 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2023-08-31 11:46:16 +0000 |
commit | 027801d93edfac9b172052c65d65a683150d6b2c (patch) | |
tree | 043ccbbf8eac11b66d0f4028988c92d6ae83fcbb /searchcore | |
parent | c5c458f910f45b6d6c52b87e0a93c2ed17f87217 (diff) |
Add saturation metric for executors.
This should make it easier to observe bottlenecks in one of the
underlying executor threads used in the "field writer" SequencedTaskExecutor.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp | 4 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h | 1 |
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); |