# rust-pure on SCAN: every row from the host-tuned binary

SCAN, 2026-10-13/14. Until this sitting only one rust-pure row on SCAN, open v4
kernel/single (e0bded0d9), came from the `rust_pure` installed on 2026-10-12.
The other 29 measured rows still came from the portable builds of
2026-10-02/03. This sitting re-measured those 29 with the installed binary, so
the flavour's rows now come from one build.

On 2026-10-16 cpp's kernel and onload rows were re-measured with the C++ binary
installed since 2026-10-11, so every cpp figure below now describes the C++
source that is installed (see "Where the cpp column comes from").

## What was measured

- **Binary:** the installed `rust_pure`, md5 `d6ede28d`, staged by
  `private/ops/scripts/build-rust-bench.sh` (1e2605da3: built for the host CPU, as the
  C++ bench is). Nothing was installed; the sweep checked the md5 before every
  lease.
- **Cells:** closed single, mono, pool and shard (15 measured cells; the five
  nopool and noshard markers are unchanged), and open v4 for the 14 cells
  other than kernel/single, one sitting per cell.
- **Host state:** kernel 5.14.0-687.44.1, ConnectX-4 Lx firmware 14.32.1912.
- **Outcome:** every cell completed on its first attempt.

## Closed, p50 in us

| Cell | Before | Now | cpp |
|---|---|---|---|
| kernel/single | 20.89 | 18.33 | 17.68 |
| onload/single | 7.00 | 5.66 | 5.48 |
| socketxtreme/single | 7.37 | 5.99 | 5.76 |
| tcpdirect/single | 6.14 | 4.80 | 4.88 |
| vma/single | 7.42 | 6.15 | 7.01 |
| kernel/mono | 244.45 | 162.65 | 139.58 |
| onload/mono | 90.56 | 60.43 | 57.24 |
| socketxtreme/mono | 103.77 | 77.24 | 76.20 |
| tcpdirect/mono | 78.14 | 57.69 | 57.73 |
| vma/mono | 88.01 | 71.11 | 67.06 |
| kernel/pool | 73.78 | 57.91 | 44.86 |
| onload/pool | 13.48 | 10.29 | 11.12 |
| vma/pool | 94.04 | 96.18 | 95.84 |
| kernel/shard | 97.66 | 69.71 | 48.31 |
| onload/shard | 18.86 | 10.51 | 14.07 |

## Open v4, service p50 in us

| Cell | Before | Now | cpp |
|---|---|---|---|
| kernel/single | - | 18.284 (2026-10-12) | 17.755 |
| onload/single | 7.273 | 5.933 | 5.633 |
| socketxtreme/single | 7.782 | 6.350 | 5.997 |
| tcpdirect/single | 6.423 | 5.048 | 4.829 |
| vma/single | 8.801 | 6.729 | 7.049 |
| kernel/mono | 53.905 | 51.607 | 49.342 |
| onload/mono | 9.992 | 9.055 | 8.956 |
| socketxtreme/mono | 11.223 | 9.723 | 15.848 |
| tcpdirect/mono | 10.793 | 9.495 | 8.698 |
| vma/mono | 10.665 | 8.722 | 8.204 |
| kernel/pool | 40.442 | 36.140 | 36.317 |
| onload/pool | 8.877 | 7.368 | 7.507 |
| vma/pool | 12.750 | 11.372 | 11.716 |
| kernel/shard | 42.358 | 37.718 | 36.535 |
| onload/shard | 9.194 | 7.360 | 7.586 |

## Reading it

- **Single session: within 0.9 us of cpp, and cpp leads seven of the ten
  cells.** rust-pure leads on vma, closed (6.15 against 7.01) and open (6.729
  against 7.049), and on closed tcpdirect (4.80 against 4.88). cpp leads on
  kernel, onload and socketxtreme, closed and open, and on open tcpdirect. The
  gap was 1.2 to 1.6 us on the bypass transports on 2026-10-02/03.
- **Multi-session:** cpp leads every kernel cell, closed and open, except open
  kernel/pool (36.317 against 36.140). On onload, cpp leads mono and rust-pure
  pool and shard, closed and open. cpp's other bypass rows did not change
  (see below); the widest gap there is open socketxtreme/mono, where rust-pure
  leads by 6.1 us.
- **rust-pure's mono gains the most** (closed, 25 to 35%): 32 sessions share
  one server thread, so the per-message engine cost is paid 32 times per turn.
- **rust-pure's gain has two sources that this sitting does not separate:**
  the engine work on main since 2026-10-02 (one indexed walk per inbound frame,
  the header read from that index, SWAR field scans, direct header writes) and
  the host-CPU build.
- **rust-pure verdicts.** Better: closed socketxtreme/mono partial to ok, open
  kernel/mono partial to ok, open kernel/pool saturated to partial. Worse while
  its numbers improved: closed kernel/shard ok to partial.
- **Against the trend:** closed kernel/single p99 rose from 25.5 to 31.2 us
  with a lower p50 and maximum, and closed vma/pool did not move.
- **The cpp column is not a same-sitting control.** Its kernel and onload rows
  were measured on 2026-10-16, two days after rust-pure's, on the same kernel
  and firmware.

## Where the cpp column comes from

| cpp rows | Measured | Binary |
|---|---|---|
| kernel and onload, closed and open (but open kernel/single) | 2026-10-16 | `bench_roundtrip` 8813683d, installed 2026-10-11 |
| open v4 kernel/single | 2026-10-11 (24d719cc3) | the same |
| vma, socketxtreme, tcpdirect | 2026-10-03 (vma and socketxtreme: single, mono, pool), otherwise 2026-09-06/13 | `bench_roundtrip_vma_sx` 440df2af and `bench_roundtrip_zf` 96d93000: the source measured, which is the 2026-09-12 bench revision plus the pool fix and the tuning stamp (84ddb9ad1) |

- **The first version of this record** (2026-10-14) compared rust-pure with
  cpp's September kernel and onload rows, from a `bench_roundtrip` replaced on
  2026-10-11, and counted rust-pure ahead on six of the ten single cells. With
  the installed binary measured, it leads on three.
- **cpp's 2026-10-11 binary against its September rows:** closed kernel 6% lower
  at single and 21 to 43% lower at mono, pool and shard; closed onload 5 to 6%
  lower at single and shard, 6% higher at mono and 8% at pool; open kernel 7 to 10%
  lower at mono and shard, unchanged at pool; open onload 6% lower at single and
  within 1.5% elsewhere. It has 7b88ae1cb (a single-session server on kernel
  sockets reads its session without poll(2)) and the C++ engine work on main
  between 2026-09-12 and 2026-10-11.
- **cpp verdicts:** closed kernel/mono, kernel/shard and onload/mono ok to
  partial; open kernel/shard partial to ok.

## Caveat

Both bench hosts have kernel 5.14.0-687.54.1 installed since 2026-10-08 and
were not rebooted. These rows, like every row on the page, describe
687.44.1.

## Evidence

The result files under `private/benchmarks/retained/results/scan/` (load-closed and
load-open-v4, flavours rust-pure and cpp); cpp's 2026-10-16 cells carry the CDF
of their raw samples. The run folders (`claude-rust-pure-native-20261013`,
pruned on 2026-10-16 once its cells had result files, and
`claude-cpp-installed-20261016`) were working output.
