Skip to content
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

scx_bpfland: Use scx_stats #556

Merged
merged 2 commits into from
Aug 25, 2024
Merged

scx_bpfland: Use scx_stats #556

merged 2 commits into from
Aug 25, 2024

Conversation

htejun
Copy link
Contributor

@htejun htejun commented Aug 25, 2024

Make scx_bpfland use scx_stats and make the reported values interval deltas.

@htejun htejun requested a review from arighi August 25, 2024 08:49
@htejun htejun changed the base branch from main to htejun/scx_stats August 25, 2024 08:53
Use scx_stats instead of prometheus for stats reporting. This has a few
advantages:

- Stats metadata can be defined more succinctly.

- Natural support for nesting statistics which will be useful in making
  scheduler components composable.

- Support for multiple programmable readers where each reader can use their
  own reading interval.

- Built-in stats help message generation.

- Openmetrics integration is still available through
  scx_stats/scripts/scxstats_to_openmetrics.py.
Three of the reported stats are cumulative. While they obviously can be
processed into delta values, that holds for the other direction too and the
cumulative values are difficult to make intutive sense of. Report interval
delta values instead.

Note that a stats client can reliably build back cumulative values even
under heavy system contention - the delta values reported between two
consecutive reads are guaranteed to be correct regardless of the duration of
the interval.
Copy link
Contributor

@arighi arighi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning to start looking at scx_stats for bpfland, but you already did everything, awesome! :)

Tested and LGTM, thanks!

Base automatically changed from htejun/scx_stats to main August 25, 2024 11:06
@htejun htejun merged commit a3ebd86 into main Aug 25, 2024
2 checks passed
@htejun htejun deleted the htejun/scx_bpfland-stats branch August 25, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants