Native transport comparison #
Hori Sendme uses the same published iroh-blobs protocol, collection, Bao verification, receiver storage, and export path over Hori and iroh. Build and usage instructions are in tools/sendme; exact timing and byte definitions are in BENCHMARKS.md.
Original default baseline #
Release builds on Linux x86_64, 12 available CPUs, loopback, one deterministic 32 MiB file, one excluded warmup and five measured transfers per backend per mode. Each sample creates fresh endpoints and a fresh receiver store, alternates backend order, verifies the download, and exports it. Import is outside the timed samples. Both relay services run locally. No public service or TURN is involved.
The original default-build results are in native-defaults.json. Values below are medians; throughput counts verified protocol payload and includes collection metadata (33,554,526 bytes for this input).
| Mode | Hori MiB/s | iroh MiB/s | Hori usable connection ms | iroh usable connection ms |
|---|---|---|---|---|
| Direct | 62.02 | 282.77 | 4.05 | 1.00 |
| Relay | 132.18 | 52.08 | 2.98 | 1.02 |
| Auto | 133.94 | 281.97 | 2.96 | 0.90 |
Hori becomes usable through the relay before its direct path is ready. In direct mode, transfer waits for that upgrade: median direct readiness was 710.46 ms from dial start, versus 1.01 ms for iroh. Hori auto transfers frequently finish on the relay before ICE completes. Connection time alone therefore does not describe time to a usable direct path. Direct mode waits for an initial direct path; Hori's normal recovery/failover remains enabled thereafter.
Those connection times start after endpoint setup. Median setup for both fresh
endpoints was about 0.8 ms for Hori in each mode; iroh measured 12.71 ms direct,
418.60 ms relay, and 6018.13 ms auto. The adapter waits for iroh's bound addresses
and, when configured, Endpoint::online() before dialing. These readiness costs
are recorded separately and included in total time; they must accompany any
startup-latency comparison. Median total direct-run time, including setup,
direct readiness, transfer and export, was 1386.02 ms Hori and 281.86 ms iroh.
Changes and isolated experiments #
WebSocket TCP_NODELAY on both ends removed a substantial relay setup/throughput penalty. The initial baseline measured about 205 ms Hori connection time and 1.42 MiB/s relayed payload. Those initial before/after runs overlapped some compilation/check activity, so they are useful for the large Nagle effect, not small differences in direct throughput. AES-GCM decryption now reuses caller storage when possible; uniquely owned incoming channel buffers also avoid an extra copy.
The quieter profile matrix isolates native tuning. Each row has five direct samples, one excluded warmup, and its own iroh control. These short local runs indicate promising profiles; they do not establish reliable tail distributions.
| Hori profile | Direct median MiB/s | Decision |
|---|---|---|
| Allocation optimized, no I/O tuning | 53.07 | Comparison reference |
| 256 KiB stream window | 59.89 | Optional; matching peer profiles required |
| Two reactor threads | 61.43 | Enabled by default |
| 4 MiB UDP buffer requests | 53.95 | Enabled with bounded reactor pool |
| Both native I/O settings | 61.30 | Selected native defaults |
| Both settings plus wide window | 71.88 | Optional; higher memory/credit budget |
| Fast ICE checks | 47.93 | Historical experiment; removed |
| str0m prototype | 34.26 | Historical prototype; removed |
The fast-ICE profile reduced median direct readiness to 361.09 ms in its run. The str0m profile reached direct readiness in 159.27 ms, but did not improve payload throughput. The removed prototype supported host candidates with a concrete bind address and rejected STUN configuration; interface roaming was unvalidated. Its prototype UDP driver uses individual sends, whereas the default driver already supports GSO/GRO, so this compares complete implementations rather than proving an intrinsic SCTP engine speed difference.
Default I/O settings preserve the wire protocol and retain 64 KiB stream credit. Requested socket buffers are subject to OS limits. Wide windows require matching peers and are checked in transfer tickets. Wide windows remain opt-in. The abandoned str0m and fast-ICE prototypes were removed for publication; their historical measurements are retained.
The later direct-path investigation identifies the GSO threshold, redundant ACKs, and two buffering limits. The current driver fork and source-path ACKs retain the first two fixes by default; larger buffers and MTU remain opt-in. The profile runner now uses that fork, so its newly generated results should not be confused with the earlier registry-engine profiles above.
Reproduce #
cargo build --release --manifest-path tools/sendme/Cargo.toml
tools/sendme/target/release/hori-sendme compare ./input.bin \
--mode all --runs 5 --warmup 1 --json comparison.json
python3 benchmarks/run-native.py ./input.bin --runs 5 --mode direct
The profile runner builds and copies each binary before measuring, records its
SHA-256/features/exit status, and never overlaps compilation with transfers. Run
other builds and tests separately. --profiles native-io combined throughput limits
the matrix. Generated input files and executables are ignored; raw JSON/logs are
retained. Report metadata records build and collection information.
These results measure local native overhead. There is no Chrome/browser client, browser cipher negotiation, or browser backpressure implementation yet. Actual UDP-loss/NAT matrices and interface switching require a capable host; this environment denies network namespace creation. Deterministic frame loss/reorder and real relay outage tests pass, but do not substitute for those network tests. Use separate-machine send/receive runs and the network harness before drawing conclusions about WAN speed, NAT success, or roaming.