Repository navigation
perf: add throughput ceiling benchmark (generator → scan → null) - #1027
Merged
Merged
Conversation
…oughput New criterion benchmark (throughput_ceiling) measures the absolute maximum throughput with no I/O and no transform — pure generator → scan → null. Dimensions varied: - Input schema: narrow (5 fields), production_mixed (variable), wide (20+ fields) - Scan config: extract_all, 3-field pushdown, no keep_raw - Batch size: 1K → 100K rows - Scan mode: streaming (StringViewArray) vs scan_detached (StringArray) - Bottleneck isolation: generator-only, scan-only, null-sink-only baselines Also adds: - bench/scenarios/self-ceiling.yaml (passthrough scenario, no filter) - just bench-ceiling (criterion) and just bench-ceiling-self (pipeline) Closes #893 Agent-Logs-Url: https://github.com/strawgate/memagent/sessions/62d84830-8c8a-4e3e-9760-ef342bb5fb99 Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Agent-Logs-Url: https://github.com/strawgate/memagent/sessions/62d84830-8c8a-4e3e-9760-ef342bb5fb99 Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Determine single-core throughput ceiling for logfwd
perf: add throughput ceiling benchmark (generator → scan → null)
Apr 5, 2026
This was referenced Apr 5, 2026
Closed
Closed
Closed
This was referenced Apr 5, 2026
strawgate
marked this pull request as ready for review
April 5, 2026 04:18
There was a problem hiding this comment.
Pull request overview
Adds a new benchmark and scenario to measure the pipeline’s single-core “throughput ceiling” in an I/O-free setup, helping contextualize performance limits (generator/scanner/null sink) and compare against existing end-to-end and criterion benchmarks.
Changes:
- Added a new Criterion benchmark (
throughput_ceiling) that sweeps schema shape, batch size, scan config, and scan mode, plus isolates generator/scan/sink costs. - Added a self-contained “ceiling” scenario (
self-ceiling.yaml) and ajust bench-ceiling-selfrecipe for end-to-end passthrough (SELECT *) without network. - Registered the new benchmark in
logfwd-benchand wired it intojust bench-fullplus a dedicatedjust bench-ceilingcommand.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
justfile |
Adds recipes to run the new ceiling benchmark (criterion) and self-contained ceiling scenario. |
crates/logfwd-bench/Cargo.toml |
Registers the new throughput_ceiling criterion bench target. |
crates/logfwd-bench/benches/throughput_ceiling.rs |
Implements the new ceiling benchmark suite (schema/batch/config/mode sweeps + isolation). |
bench/scenarios/self-ceiling.yaml |
Adds a no-filter passthrough self scenario (SELECT *) with null output. |
bench/scenarios/README.md |
Documents how to run the new scenario and adds it to the scenarios table. |
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.
throughput_ceilingcriterion benchmark measuring pure generator → scan → null throughputcrates/logfwd-bench/Cargo.tomlbench-ceilingandbench-ceiling-selfrecipes to justfileself-ceiling.yamlpassthrough scenario (no filter)bench/scenarios/README.mdwith new scenariotaskset -c 0 cargo bench -p logfwd-bench --bench throughput_ceiling -- --noplotandtaskset -c 0 just bench-ceiling-self 102.2244–2.2373 M lines/secwith mixed-schema input plus 3-field pushdown; this is the highest single-core scan→null result in the sweep1.9951–2.2908 M lines/secat221.72–223.16 MiB/sec969.65–983.37 K lines/secat251.21–256.83 MiB/sec404.46–409.45 K lines/secat234.17–236.24 MiB/sec10Krows at1.0039–1.0076 M lines/sec;100Krows regressed to892.49–903.32 K lines/sec, so larger batches do not keep improving throughput2.2244–2.2373 M lines/secversus990.25–994.18 K lines/secforextract_all(~2.25xfaster);keep_raw: falsemade no meaningful difference versus default (985.38–991.18 K lines/sec)scan_detachedbeat streaming on mixed input (990.81–994.48 K lines/secvs931.32–942.09 K lines/sec, about5–6%faster)2.1332–2.1410 M lines/sec, scan-only reached991.35–995.52 K lines/sec, and null-sink-only was effectively free (~160,000 Gelem/sec)just bench-ceiling-self 10processed10,344,000lines in10.0s=1,033,057 lines/sec1.7M lines/secclaim, the measured passthrough pipeline on this machine is lower (~1.03M/sec), but narrow/full-schema and pushdown-heavy criterion cases still exceed2.2M/sec; the current bound for realistic mixed-schema full extraction is the scanner at about1.0M lines/secNote
Add throughput ceiling benchmarks for generator → scan → null pipeline
throughput_ceilingwith five benchmark groups: by schema, by batch size, by scan config, by scan mode, and bottleneck isolation (generator/scan/sink measured separately).just bench-ceilingto run the Criterion benchmarks andjust bench-ceiling-selfto run the end-to-end passthrough scenario viabench/scenarios/self-ceiling.yaml(generator →SELECT *→ null).bench-fullso it runs alongside existing criterion suites.Macroscope summarized 8120445.