Repository navigation
Conversation
The demo now uses the streaming benchmark topology: branch A/B, merge and estimate are separate processes, each pinned to one CPU and connected by OTLP/HTTP over TCP. `run-streaming.py --demo` runs the exact and KLL pipelines side by side until Ctrl+C (or SIGTERM) and serves per-process throughput, CPU, egress, RSS and validated answers to Prometheus; a new Grafana dashboard shows them. Estimate can also merge the last N windows for rolling p50/p99 (`--rolling-windows`, default off for capacity runs). Replaces the single-process asap-kll-stream-demo. The Grafana stack uses host networking bound to 127.0.0.1. Docs include sweep results from a 56-core x86 server.
zzylol
force-pushed
the
feat/kll-prometheus-grafana
branch
from
October 13, 2026 00:20
d31060b to
a0466df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds persistent, mergeable KLL panes with rolling quantiles, and a live demo that runs KLL next to exact on the same traffic, with every processor in its own pinned process, reporting throughput, CPU and accuracy to Prometheus/Grafana.
Before → after
KllWindowStore/window_slideretain tumbling KLL panes and merge them for aligned range and rolling queries.demos/kll-grafana/run-demo.shruns the exact and KLL pipelines side by side until Ctrl+C. Branch A/B, merge and estimate are separate processes (one container each,--cpuset-cpusto one CPU), connected by OTLP/HTTP over TCP. This is theasap-stream-benchtopology from Benchmark sustained OTLP streaming and real network resource use #19, so the demo and the benchmark measure the same code.Run
Open http://localhost:3000/d/asap-kll-stream. Linux + Docker Compose; each pipeline needs 7 CPUs (2 generator, 4 processors, 1 backend).
56-core x86 server, 50,000 signals/s per source. KLL keeps up with 100,000 signals/s at 0.96 processor CPU-seconds per million signals. Exact uses 23 and is back-pressured to about 68,000 signals/s.
Throughput: KLL vs exact (vs raw forwarding)
Same harness as #19: 65,536-observation windows, 3 runs per point, one dedicated CPU per processor, a 56-core x86 server. Median backend-validated signals/s, both sources:
By the CAPACITY_DESIGN criteria, the largest sustainable offered rate per source is 10,000 for exact, 100,000 for raw, and at least 400,000 (the highest tested) for KLL.
Processor CPU and egress summed over branches, merge and estimate, at the same load:
Accuracy
The backend validates every window: exact must match, KLL must be within 5%. Observed KLL relative error: p50 0.5%, p99 1.6%, tumbling and 6-window rolling.
Validation
Library, window, runtime, and benchmark-model tests pass, along with fmt and Clippy. The demo ran end to end on two servers. Stopping with Ctrl+C or SIGTERM removes all containers and networks.
Limits: count-aligned windows replaying one deterministic corpus (so quantile lines are flat by design); in-memory retention; KLL value error, not rank error. See the demo and window guide.