diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-02-22 15:14:31 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-02-22 15:14:31 +0000 |
commit | 5689ba09b45517a9e5da116b7ef0bb6af09a3c80 (patch) | |
tree | 8d7bc706b6c8f1d0286055869cdd51bc65aa15aa /storage | |
parent | 6d0dc2a9001fea925fe11ae5a4351bb980525fc1 (diff) |
Add backend metrics for new operation throttler statistics
Diffstat (limited to 'storage')
3 files changed, 6 insertions, 0 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index f7d4f750884..10df36579cd 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -333,6 +333,8 @@ FileStorHandlerImpl::updateMetrics(const MetricLockGuard &) _metrics->pendingMerges.addValue(_mergeStates.size()); _metrics->queueSize.addValue(getQueueSize()); _metrics->throttle_window_size.addValue(_operation_throttler->current_window_size()); + _metrics->throttle_waiting_threads.addValue(_operation_throttler->waiting_threads()); + _metrics->throttle_active_tokens.addValue(_operation_throttler->current_active_token_count()); for (const auto & stripe : _metrics->stripes) { const auto & m = stripe->averageQueueWaitingTime; diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp index 80fd79fe780..a10726c4f94 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp @@ -213,6 +213,8 @@ FileStorDiskMetrics::FileStorDiskMetrics(const std::string& name, const std::str queueSize("queuesize", {}, "Size of input message queue.", this), pendingMerges("pendingmerge", {}, "Number of buckets currently being merged.", this), throttle_window_size("throttle_window_size", {}, "Current size of async operation throttler window size", this), + throttle_waiting_threads("throttle_waiting_threads", {}, "Number of threads waiting to acquire a throttle token", this), + throttle_active_tokens("throttle_active_tokens", {}, "Current number of active throttle tokens", this), waitingForLockHitRate("waitingforlockrate", {}, "Amount of times a filestor thread has needed to wait for " "lock to take next message in queue.", this), diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.h b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.h index 1bcbacd2ca6..c2b5d29bcdd 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.h +++ b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.h @@ -151,6 +151,8 @@ public: metrics::LongAverageMetric queueSize; metrics::LongAverageMetric pendingMerges; metrics::LongAverageMetric throttle_window_size; + metrics::LongAverageMetric throttle_waiting_threads; + metrics::LongAverageMetric throttle_active_tokens; metrics::DoubleAverageMetric waitingForLockHitRate; metrics::DoubleAverageMetric lockWaitTime; // unused ActiveOperationsMetrics active_operations; |