{"id":31274045,"url":"https://github.com/eladwf/ebpf-tuner-poc","last_synced_at":"2026-05-18T02:11:02.421Z","repository":{"id":315794783,"uuid":"1060849494","full_name":"eladwf/ebpf-tuner-poc","owner":"eladwf","description":"Experimental Rust tuner agent using eBPF for low-overhead telemetry and adaptive workload control. Proof-of-concept for smarter, always-on system tuning","archived":false,"fork":false,"pushed_at":"2025-09-20T18:16:37.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T20:28:15.033Z","etag":null,"topics":["ebpf","low-latency","performance","rust","system-tuning"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eladwf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-20T18:06:00.000Z","updated_at":"2025-09-20T18:19:29.000Z","dependencies_parsed_at":"2025-09-20T20:28:36.671Z","dependency_job_id":"10c634ba-da99-4bf6-a78b-e922d8a41915","html_url":"https://github.com/eladwf/ebpf-tuner-poc","commit_stats":null,"previous_names":["eladwf/ebpf-tuner-poc"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/eladwf/ebpf-tuner-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eladwf%2Febpf-tuner-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eladwf%2Febpf-tuner-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eladwf%2Febpf-tuner-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eladwf%2Febpf-tuner-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eladwf","download_url":"https://codeload.github.com/eladwf/ebpf-tuner-poc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eladwf%2Febpf-tuner-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebpf","low-latency","performance","rust","system-tuning"],"created_at":"2025-09-23T22:29:25.158Z","updated_at":"2026-05-18T02:11:02.416Z","avatar_url":"https://github.com/eladwf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ebpf-tuner-poc\n\n**Status:** experimental / proof‑of‑concept\n\nA small tuner agent for Linux that uses **eBPF** for low‑overhead telemetry and **Rust** for orchestration.  \nThe goal is to test whether a lightweight agent can *observe* key kernel signals (sched, futex, I/O) and *nudge*\nworkloads toward better behavior with simple policies. This is a POC — expect rough edges.\n\n---\n\n## What it is\n- A **Rust** daemon (Tokio) that subscribes to a stream of kernel events and counters.\n- A set of **eBPF programs** (CO‑RE via **libbpf‑rs**) that attach to common performance pain points:\n  - `sched:*` tracepoints (e.g., context switches, wakeups) for run‑queue pressure and on‑CPU ratios\n  - futex wait/wake sites for lock contention signals\n  - optional net/blk hooks for bursts that correlate with tail latency (kernel‑version dependent)\n- A **policy engine** that maps signals → safe “nudges”: change a cgroup weight, spread or pin threads, back off work on high PSI, etc.\n\n**Not production.** The main point is to explore the shape of an “always‑on, low‑overhead” tuner.\n\n---\n\n## High‑level architecture\n```\n[eBPF programs]  -\u003e  [ringbuf/perfbuf]  -\u003e  [Rust Orchestrator]\n         ^                                         |\n         |                                         v\n     [maps/counters]                        [Actions (effects)]\n```\n\n- **Metrics pipeline**\n  - eBPF emits compact events (counts/timestamps) over ring buffers/maps.\n  - The Rust side aggregates into rolling windows (EWMA, percentiles, simple burst detectors).\n- **Strategies**\n  - `HeuristicStrategy`: thresholded rules (“if run‑queue \u003e N and PSI \u003e X% → spread threads”).\n  - `LearnedStrategy` (stub): placeholder for model‑driven decisions.\n- **Actions**\n  - `cpu_weight`: adjust cgroup CPU.weight to de‑prioritize noisy neighbors or raise weight on starved groups.\n  - `cpuset_spread`: spread a target across CPUs to reduce same‑core contention.\n  - `numa_rebalance`: nudge a workload toward a preferred NUMA node when cross‑node misses spike.\n  - `pressure_backoff`: when PSI (memory/CPU) is high, gently reduce concurrency.\n  - `io_prefetch` (stub): hook for read‑ahead / pre‑touch strategies.\n- **Scopes**\n  - target a **PID set** or an entire **cgroup v2** subtree.\n\n---\n\n## What works today\n- Builds on recent Linux with BTF available.\n- eBPF side compiled via Clang/LLVM (CO‑RE), loaded from Rust using **libbpf‑rs**.\n- Sched + futex signals; simple aggregation in Rust; a handful of actions wired in.\n- Dry‑run mode for audits (see below).\n\n---\n\n## Build\n```bash\n# from repo root\ncargo build --release\n```\n\nIf your environment lacks kernel headers/BTF, use your distro’s `-dbg`/`-dbgsym` or install `kernel-debuginfo`.\n\n---\n\n## Stack\n- **Rust** orchestrator (Tokio, Serde).\n- **eBPF** built as CO‑RE C and loaded with **libbpf‑rs**.\n- Minimal dependencies; tries to keep hot paths lean.\n\n---\n\n## License\nMIT for the POC code unless stated otherwise in subfolders.\n\n---\n\n## Disclaimer\nThis is an experiment. It may change direction or get torn apart and rebuilt.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feladwf%2Febpf-tuner-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feladwf%2Febpf-tuner-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feladwf%2Febpf-tuner-poc/lists"}