Skip to content

scx_metrics: add standalone scheduler metrics exporter - #3704

Open
newell-purdue wants to merge 1 commit into
sched-ext:mainfrom
newell-purdue:main
Open

scx_metrics: add standalone scheduler metrics exporter#3704
newell-purdue wants to merge 1 commit into
sched-ext:mainfrom
newell-purdue:main

Conversation

@newell-purdue

Copy link
Copy Markdown
Contributor

scx_metrics with work conservation as first metric

Trying to fill a need to track key metrics for scx schedulers over long periods of time with very little overhead.

Next steps listed in comment of: (1) handling tasks with affinity, (2) grouping metrics by task groups at cgroup boundary, and (3) including new low-overhead metrics critical to tracking scx scheduler behavior.

Testing

Ran on a 48 core machine where I ran stress -c 20. Then, I toggled on an scx scheduler that happens to do poorly in terms of scheduling cargo run -p scx_layered -- f:scheds/rust/scx_layered/examples/avgruntime.json, effectively only limited cores to be used due to protected mode.

Ran the following for scx_metrics, allowing prometheus to export the counters:

cargo run -p scx_metrics -- --listen 127.0.0.1:9345
Screenshot 2026-07-13 at 10 31 45 PM Screenshot 2026-07-13 at 10 34 03 PM

@newell-purdue

Copy link
Copy Markdown
Contributor Author

@kkdwvd to review

@kkdwvd

kkdwvd commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

It might make sense to keep this under tools/, but otherwise looks great.

@sirlucjan

Copy link
Copy Markdown
Collaborator

It might make sense to keep this under tools/, but otherwise looks great.

Good point, in my opinion, it definitely belongs in /tools.

What do you think @htejun?

@sirlucjan
sirlucjan requested a review from htejun July 14, 2026 07:01
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.

3 participants