scx/scheds/rust
Jose Fernandez 83373b1f4e
rusty: Integrate stats with the metrics framework
We need a layer of indirection between the stats collection and their
output destinations. Currently, stats are only printed to stdout. Our
goal is to integrate with various telemetry systems such as Prometheus,
StatsD, and custom metric backends like those used by Meta and Netflix.
Importantly, adding a new backend should not require changes to the
existing stats code.

This patch introduces the `metrics` [1] crate, which provides a
framework for defining metrics and publishing them to different
backends.

The initial implementation includes the `dispatched_tasks_count`
metric, tagged with `type`. This metric increments every time a task is
dispatched, emitting the raw count instead of a percentage. A monotonic
counter is the most suitable metric type for this use case, as
percentages can be calculated at query time if needed. Existing logged
metrics continue to print percentages and remain unchanged.

A new flag, `--enable-prometheus`, has been added. When enabled, it
starts a Prometheus endpoint on port 9000 (default is false). This
endpoint allows metrics to be charted in Prometheus or Grafana
dashboards.

Future changes will migrate additional stats to this framework and add
support for other backends.

[1] https://metrics.rs/

Signed-off-by: Jose Fernandez <josef@netflix.com>
2024-06-21 10:18:44 -06:00
..
scx_lavd compat: Drop __COMPAT_SCX_KICK_IDLE 2024-06-15 20:24:15 -10:00
scx_layered compat: Drop __COMPAT_scx_bpf_cpuperf_*() 2024-06-16 06:16:53 -10:00
scx_mitosis compat: Drop __COMPAT_scx_bpf_switch_all() 2024-06-15 20:03:37 -10:00
scx_rlfifo scx_rlfifo: dispatch all tasks on the first CPU available 2024-06-15 16:13:53 +02:00
scx_rustland scx_rustland: prevent excessive starvation when system is congested 2024-06-14 20:09:19 +02:00
scx_rusty rusty: Integrate stats with the metrics framework 2024-06-21 10:18:44 -06:00
meson.build scheds: Add scx_mitosis scheduler 2024-06-11 10:34:53 -07:00
README.md scx_lavd: add scx_lavd (Latency-criticality Aware Virtual Deadline) scheduler 2024-03-16 10:31:07 +09:00

RUST SCHEDULERS

Introduction

This directory contains schedulers with user space rust components.

The README in each scheduler directory provides some background and describes the types of workloads or scenarios they're designed to accommodate. For more details on any of these schedulers, please see the header comment in their main.rs or *.bpf.c files.

Schedulers