Skip to content

docs(cargo): stop promising 20-40% faster I/O from the io_uring feature - #7631

Merged
oferchen merged 1 commit into
masterfrom
docs/io-uring-benefit-claim
Sep 2, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/io-uring-benefit-claim

Conversation

@oferchen

@oferchen oferchen commented Sep 2, 2026

Copy link
Copy Markdown
Owner

The claim

Cargo.toml's io_uring feature block promised, unconditionally:

# Benefits: 20-40% faster I/O on supported systems via syscall batching

That is an end-to-end throughput promise on a shipped feature flag. Two
independent on/off measurements put the real figure at parity with standard
read(2)/write(2) — within ±2% on both a bulk shape and a high-fan-out
shape, in both directions.

The figure is misapplied, not invented

This is the interesting part, and it is why the fix is a rewrite rather than
a deletion. The number has a real source — the design note at
docs/audits/disk-commit-iouring-batching.md:307-311:

Empirically the saving in CPU instructions on a small-file workload
(cp-style copy of many tiny files) on io_uring is usually 20-40% in
user time
, but disk-bound workloads see <5% because the bottleneck is
the device.

Two things happened between there and Cargo.toml:

  1. the quantity changed — user-time instruction count became
    "faster I/O", i.e. wall clock;
  2. the qualifier in the same sentence (<5% when disk-bound) was dropped.

Both moves were in the favourable direction, which is why the line read
plausibly and survived. The audit sentence itself is deliberately left
untouched
— it is accurate for the quantity it actually names, and
"correcting" it would replace a true statement with a false one.

Why here and not elsewhere

grep finds 20-40% at nine sites. Eight are not this claim and are not
touched:

  • README.md:179, docs/oc-rsync.1.md:1345, and the SSH-config audit
    describe SSH+rsync double-compression CPU cost — a different subject
    entirely;
  • four checksum audits describe the DoubleBufferedReader pipelined-hash
    win — a different mechanism, and unmeasured by the io_uring A/B;
  • the io_uring audit itself is the correctly-qualified source quoted above.

Cargo.toml:71 was the only site making an unconditional end-to-end io_uring
throughput promise.

It is also a positional sibling: the README's version of this claim was
already reconciled against the same measurement in an earlier pass, and this
site was missed. The two now agree.

The replacement

States the mechanism actually delivered, and records why no percentage
belongs on this line, so the user-time-to-wall-clock promotion cannot
silently recur:

# Benefits: fewer I/O syscalls via submission batching. This buys syscall
#   count, NOT throughput: an on/off A/B measured end-to-end transfer time at
#   parity with standard read(2)/write(2) (within +/-2% on both bulk and
#   high-fan-out shapes). Do not restate a throughput percentage here - ...

Verification

  • No functional change: the feature's dependency list
    (["transfer/io_uring", "fast_io/io_uring"]) is byte-identical, confirmed
    by re-parsing the manifest and reading the value back.
  • Cargo.toml still parses.
  • Comment-only diff: 1 file, +9/-1.

The `io_uring` feature comment claimed "Benefits: 20-40% faster I/O on
supported systems via syscall batching" as an unconditional end-to-end
throughput promise. Two independent on/off measurements contradict it.

The figure is not invented, it is MISAPPLIED. Its source, the design note at
docs/audits/disk-commit-iouring-batching.md:307-311, is about CPU
INSTRUCTION COUNT in user time on a small-file workload, and carries its own
qualifier in the same sentence: "disk-bound workloads see <5% because the
bottleneck is the device". A user-time figure was promoted into a wall-clock
"faster I/O" claim, and the qualifier was dropped in the promotion. That
audit line is left untouched - it is accurate for the quantity it names.

The README half of this claim was already reconciled; this is the sibling
site that pass missed, so the two now agree. The replacement states the
mechanism that is actually delivered (fewer syscalls) and records why no
percentage belongs here, so the promotion cannot silently recur.

No functional change: the feature's dependency list is byte-identical and
the file still parses.
@oferchen
oferchen merged commit 023b695 into master Sep 2, 2026
12 of 13 checks passed
@oferchen
oferchen deleted the docs/io-uring-benefit-claim branch September 2, 2026 15:32
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 2, 2026
oferchen added a commit that referenced this pull request Sep 2, 2026
… merged PRs (#7634)

* docs(rustdoc): reach the public items rustdoc could not see, and gate the class

Two halves of the same question - is what a public item says actually reachable
from `cargo doc`?

Half 1: seven `//` comment blocks documented a `pub` item, so their text never
reached the generated docs. Found positionally, not by content: a `//` run whose
next non-attribute line declares a `pub` item. A census keyed on comment CONTENT
is false-positive dominated; this one is mechanical.

Nine sites matched; two are DELIBERATELY left as `//`, because they document the
`#[cfg_attr]` / `#[allow]` attribute directly beneath them rather than the item -
`local_copy/overrides.rs` and `local_copy/plan/report.rs`. Promoting those would
attach a lint rationale to a public surface as if it described the surface.

Text is preserved verbatim, upstream citations included (`generator.c:2149` on
the obstacle module). The only rewrite is `socket_options/consts.rs`, where one
group note covered two constants: split per item, matching the file's own house
style where every other const already carries `///`.

Half 2: five intra-doc links could not resolve in a DEFAULT build, and the
existing gate is structurally unable to see them.

  crates/fast_io/src/lib.rs, ewma.rs (x4)  -> `adaptive_dispatch`, gated by the
                                              off-by-default
                                              `adaptive-basis-dispatch` feature
  crates/rsync_io/.../sync_bridge.rs       -> `crate::channel_adapter`, gated by
                                              the off-by-default `async-ssh`
                                              feature
  crates/fast_io/src/confinement.rs        -> `PinnedRoot`, a PRIVATE struct

plus one already on the branch in `module_list/types.rs`, where the link was
`Transport::Quic` (the `quic` feature) and its surrounding prose still described
the variant as unbuilt.

Every crate denies `rustdoc::broken_intra_doc_links`, so each of these is a hard
`cargo doc` failure, not a warning. MEASURED on the pristine base:

    cargo doc --no-deps --workspace   ->  7 errors, `fast_io` and `rsync_io`
                                          could not be documented
    cargo doc --no-deps --workspace --all-features  ->  clean

That gap is the whole point. Under `--all-features` the gated items EXIST, so
the link resolves and the gate is green; in a default build the item is not
compiled at all. `ci.yml`'s `rustdoc-links` job runs only `--all-features`,
deliberately mirroring `pages.yml` - which is right for the question Pages asks
and cannot ask this one. So the fix is paired with a SECOND step on default
features, and neither subsumes the other: `crates/fast_io/src/io_uring` is
`cfg(all(target_os = "linux", feature = "io_uring"))` and only the all-features
run compiles it.

The names stay in backticks with the reason stated at each site, rather than
being deleted or the links made conditional - the prose still says what it said,
and the next reader learns why it is not a link.

After: both invocations document all 25 crates cleanly, 0 errors. fmt clean;
clippy on the five touched crates reports no new diagnostics.

* docs(changelog): record the ten pull requests merged since the last sweep

#7624 brought the Unreleased section up to #7620 and then stopped being true:
#7621-#7632 landed after it, of which #7624 is itself that changelog pass and
#7628 was never merged. Ten entries were missing.

Each is placed in the subsection its change belongs to rather than appended in
number order, and #7625 is SPLIT across two, because it is two changes: wiring
`--force` is a receiver fix, and the synthetic-transfer-root guard that wiring
made necessary is a peer-supplied input bound. Filing it once under either
heading would have hidden whichever half the reader was looking for.

  Security / peer-supplied input bounds   #7625 (guard half), #7630
  Fixed / transfer and receiver           #7622, #7625 (--force half), #7627
  Fixed / daemon                          #7629
  Testing and CI                          #7621, #7623, #7632
  Documentation                           #7626, #7631

Wording is taken from each merge commit's own body, not from its title - the
titles compress away the part a reader needs. #7629's title says "keep a dead
name converter apart from an unknown name"; what makes it worth an entry is that
five outcomes collapsed into one `None` and the merge failed OPEN on exactly the
mechanism an operator installs to take ownership decisions away from the peer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant