Repository navigation
bench(fast_io): io_uring per-file vs shared ring on 100K small files (#1410) - #4197
Merged
Merged
Conversation
Adds a Criterion bench that synthesises the two ring lifecycles called out in docs/audits/per-file-vs-shared-uring-ring.md (#1410): the current per-file ring (one io_uring_setup per output file) and a long-lived shared ring that re-registers each new fd into the same fixed-file table. Each topology writes 100,000 4 KiB files and reports throughput in elements/second so the rows compare directly. The bench is Linux-only (gated by target_os = "linux" with a stub main for macOS / Windows), requires the io_uring feature, and is gated by the OC_RSYNC_BENCH_IOURING_RING=1 env var so casual cargo bench runs do not pick up multi-minute work. It skips cleanly when io_uring_setup is blocked by the kernel or container runtime.
oferchen
force-pushed
the
bench/iouring-per-file-vs-shared-1410
branch
from
May 17, 2026 03:43
8f914b7 to
241293a
Compare
This was referenced May 17, 2026
oferchen
added a commit
that referenced
this pull request
May 17, 2026
…4220) Document the trade-offs for pushing io_uring SQEs from rayon worker threads. Records current submission topology, per-worker hazards, the single-submitter alternative, missing bench evidence, and a recommendation to defer until #2243 (per-thread rings) and #4197 (per-file vs shared ring bench) converge.
3 tasks
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…1410) (#4197) * bench(fast_io): io_uring per-file vs shared ring on 100K small files Adds a Criterion bench that synthesises the two ring lifecycles called out in docs/audits/per-file-vs-shared-uring-ring.md (#1410): the current per-file ring (one io_uring_setup per output file) and a long-lived shared ring that re-registers each new fd into the same fixed-file table. Each topology writes 100,000 4 KiB files and reports throughput in elements/second so the rows compare directly. The bench is Linux-only (gated by target_os = "linux" with a stub main for macOS / Windows), requires the io_uring feature, and is gated by the OC_RSYNC_BENCH_IOURING_RING=1 env var so casual cargo bench runs do not pick up multi-minute work. It skips cleanly when io_uring_setup is blocked by the kernel or container runtime. * style(fast_io): apply rustfmt to iouring_per_file_vs_shared bench
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…4220) Document the trade-offs for pushing io_uring SQEs from rayon worker threads. Records current submission topology, per-worker hazards, the single-submitter alternative, missing bench evidence, and a recommendation to defer until #2243 (per-thread rings) and #4197 (per-file vs shared ring bench) converge.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…1410) (#4197) * bench(fast_io): io_uring per-file vs shared ring on 100K small files Adds a Criterion bench that synthesises the two ring lifecycles called out in docs/audits/per-file-vs-shared-uring-ring.md (#1410): the current per-file ring (one io_uring_setup per output file) and a long-lived shared ring that re-registers each new fd into the same fixed-file table. Each topology writes 100,000 4 KiB files and reports throughput in elements/second so the rows compare directly. The bench is Linux-only (gated by target_os = "linux" with a stub main for macOS / Windows), requires the io_uring feature, and is gated by the OC_RSYNC_BENCH_IOURING_RING=1 env var so casual cargo bench runs do not pick up multi-minute work. It skips cleanly when io_uring_setup is blocked by the kernel or container runtime. * style(fast_io): apply rustfmt to iouring_per_file_vs_shared bench
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…4220) Document the trade-offs for pushing io_uring SQEs from rayon worker threads. Records current submission topology, per-worker hazards, the single-submitter alternative, missing bench evidence, and a recommendation to defer until #2243 (per-thread rings) and #4197 (per-file vs shared ring bench) converge.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…1410) (#4197) * bench(fast_io): io_uring per-file vs shared ring on 100K small files Adds a Criterion bench that synthesises the two ring lifecycles called out in docs/audits/per-file-vs-shared-uring-ring.md (#1410): the current per-file ring (one io_uring_setup per output file) and a long-lived shared ring that re-registers each new fd into the same fixed-file table. Each topology writes 100,000 4 KiB files and reports throughput in elements/second so the rows compare directly. The bench is Linux-only (gated by target_os = "linux" with a stub main for macOS / Windows), requires the io_uring feature, and is gated by the OC_RSYNC_BENCH_IOURING_RING=1 env var so casual cargo bench runs do not pick up multi-minute work. It skips cleanly when io_uring_setup is blocked by the kernel or container runtime. * style(fast_io): apply rustfmt to iouring_per_file_vs_shared bench
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…4220) Document the trade-offs for pushing io_uring SQEs from rayon worker threads. Records current submission topology, per-worker hazards, the single-submitter alternative, missing bench evidence, and a recommendation to defer until #2243 (per-thread rings) and #4197 (per-file vs shared ring bench) converge.
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.
Summary
crates/fast_io/benches/iouring_per_file_vs_shared.rs, a Criterion bench that synthesises the two ring lifecycles called out indocs/audits/per-file-vs-shared-uring-ring.md(task Add xtask branding command and correct CI CLI test target #1410): the current per-file ring (oneio_uring_setup(2)per output file) and a long-lived shared ring that re-registers each new fd into the same fixed-file table.target_os = "linux", with a stubmainon macOS / Windows). Registered inCargo.tomlwithrequired-features = ["io_uring"]and gated at runtime byOC_RSYNC_BENCH_IOURING_RING=1so casualcargo benchruns do not pick up multi-minute work.fast_io. The per-file prototype lives entirely inside the bench file with documented SAFETY comments on eachunsafeblock.What the numbers inform
Outcome -> action on task #2243 (shared-ring priority):
sharedclearsper_fileby >= 25% -> promote Guard env mutations in fallback tests #2243 to P1, schedule the receiver-side rewrite.sharedregresses -> investigate single-ring submit/wait serialisation before closing Guard env mutations in fallback tests #2243.How to run
Requires an unprivileged container or bare-metal Linux 5.6+ with
io_uring_setup(2)reachable (GitHub-hosted Windows / macOS runners cannot execute it):Without the env var, the bench prints a skip line and exits 0.
Test plan
OC_RSYNC_BENCH_IOURING_RING=1confirms bothper_file_ringandshared_ringrows produce elements/sec measurements.