Repository navigation
resource_monitors: add WorkerUtilizationTracker for event-loop utilization - #49399
Draft
antoniovleonti wants to merge 3 commits into
Draft
antoniovleonti wants to merge 3 commits into
antoniovleonti wants to merge 3 commits into
Conversation
…ation Signed-off-by: antoniovleonti <leonti@google.com>
…tionTracker Signed-off-by: antoniovleonti <leonti@google.com>
…ed idle polls Signed-off-by: antoniovleonti <leonti@google.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: resource_monitors: add WorkerUtilizationTracker for event-loop utilization
Introduces
WorkerUtilizationTrackerInterfaceandWorkerUtilizationTracker, a single-threadedEvent::Evwatch::Observerthat measures a worker thread's event-loop utilization ([0.0, 1.0]):epoll_waitidle durations (onPreparetoonCheck), capping intentional sleep at*timeoutwhen a finite poll timeout was requested so late-wakeup scheduler delays count as busy time.sampleUtilization()always executes inside a callback on its own dispatcher thread (outsideepoll_wait), computes1.0 - idle / delta_walldirectly over completed idle intervals and resets accumulated idle time without cross-window carry-over.Additional Description:
Part 2 of a 4-PR series introducing the
envoy.resource_monitors.adaptive_worker_capacitysynchronous-feedback resource monitor (#49325, building on #47607 and #46101):DynamicTokenBucket(resource_monitors: add DynamicTokenBucket for adaptive worker capacity #49323, merged)WorkerUtilizationTrackerRefillRateController(log-linear refill-rate adaptation)AdaptiveWorkerCapacityMonitor, v3 config API, factory registration, integration test, and docsGenerative AI disclosure: Assisted by generative AI tooling; reviewed and verified by the author.
Risk Level: Low
Testing: Unit tests in
//test/extensions/resource_monitors/adaptive_worker_capacity:worker_utilization_tracker_testDocs Changes: N/A (included with extension registration in Part 4)
Release Notes: N/A (included with extension registration in Part 4)
Platform Specific Features: N/A
#49325