-
Notifications
You must be signed in to change notification settings - Fork 255
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
clean up shrink candidate stat #3037
clean up shrink candidate stat #3037
Conversation
a60c0d8
to
77c31c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like it
accounts-db/src/accounts_db.rs
Outdated
datapoint_info!( | ||
"shrink_select", | ||
("select_time_us", measure.as_us(), i64), | ||
("candidates_count", candidates_count, i64), | ||
("selected_count", shrink_slots.len(), i64), | ||
( | ||
"deferred_to_next_round_count", | ||
shrink_slots_next_batch.len(), | ||
i64 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these new datapoints go into ShrinkStats instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not.
FWIK. ShrinkStats is more like an aggregated view from accounts-db's perspective, which aggregates all the calls to shrink and report a sum of the timing and other stats for all the shrink invocations per a period. While this datapoint is to report timing and stats from just one invocation of shrink, such as one shrink call from ABS. Thus, it can be thought of as a more detailed stats for handle_snapshot_requests-timing.shrink_time
.
77c31c7
to
f6bf5a2
Compare
I pushed another change to move the datapoint one level up to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refactor and cleanup looks correct to me.
rework shrink select stat Co-authored-by: HaoranYi <[email protected]>
Problem
When selecting candidate storages for shrinking, it will be helpful to report
how many storages are selected to shrink, how many are deferred for next round,
and what's the total number of storages to begin with. This will help us to
tune the threshold of alive ratio for shrinking cut off.
The current metric is using a debug counter, seems to be obsolete and doesn't
provide the above info.
Summary of Changes
rework shrink select metrics - report select timing, selected count, deferred
count, and total count as datapoint_info.
Fixes #