-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pageserver: add tokio-epoll-uring slots waiters queue depth metrics #9482
Merged
yliang412
merged 14 commits into
main
from
yuchen/export-tokio-epoll-uring-slots-queue-depth
Oct 25, 2024
Merged
pageserver: add tokio-epoll-uring slots waiters queue depth metrics #9482
yliang412
merged 14 commits into
main
from
yuchen/export-tokio-epoll-uring-slots-queue-depth
Oct 25, 2024
Conversation
This file contains 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
Signed-off-by: Yuchen Liang <[email protected]>
Signed-off-by: Yuchen Liang <[email protected]>
5256 tests run: 5041 passed, 0 failed, 215 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
143cc19 at 2024-10-25T20:12:55.440Z :recycle: |
Signed-off-by: Yuchen Liang <[email protected]>
Signed-off-by: Yuchen Liang <[email protected]>
yliang412
commented
Oct 25, 2024
Signed-off-by: Yuchen Liang <[email protected]>
yliang412
commented
Oct 25, 2024
yliang412
commented
Oct 25, 2024
…d remove unused Default impl
This reverts commit a463865.
problame
approved these changes
Oct 25, 2024
yliang412
added a commit
to neondatabase/tokio-epoll-uring
that referenced
this pull request
Oct 25, 2024
## Problem We want to make slots waiters queue depth observable, so it is easier to tune the submission queue size (also equal to the number of inflight operation as implemented in the system). ## Summary of changes - Introduced `PerSystemMetrics` trait that record slots submission queue depth. In the future, per-system metrics can be added through extending this trait. - `tokio_epoll_uring::System` now takes in the per-system metrics observer `Arc<M> where M : PerSystemMetrics` ## Alternative design See neondatabase/neon#9482 for details. --------- Signed-off-by: Yuchen Liang <[email protected]> Co-authored-by: Christian Schwarz <[email protected]>
Signed-off-by: Yuchen Liang <[email protected]>
yliang412
deleted the
yuchen/export-tokio-epoll-uring-slots-queue-depth
branch
October 25, 2024 20:30
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.
In complement to neondatabase/tokio-epoll-uring#56.
Problem
We want to make tokio-epoll-uring slots waiters queue depth observable via Prometheus.
Summary of changes
pageserver_tokio_epoll_uring_slots_submission_queue_depth
metrics as aHistogram
.LocalHistogram
to observe the metrics.Arc<ThreadLocalMetrics>
used on-demand to flush data to the shared histogram.Collector::collect
to reportpageserver_tokio_epoll_uring_slots_submission_queue_depth
.Alternative Design Considered #
Since the overall idea is to let each thread observe the metrics separately and on demand aggregate the metrics, the thread_local crate may seem to be a good fit because we can use the its iterator to collect thread local metrics (Rust std library does not).
However, the implementation does not free up the thread_local storage until the
ThreadLocal<T>
object got destroyed. Even if thread ids are aggressively reused, we would have at least n thread local storage, where n is the maximum number of active threads throughout lifetime of theThreadLocal<T>
. This is not acceptable in our use case, as this number would be num_runtime (4) times the spawn_blocking pool size (512).Checklist before requesting a review
Checklist before merging