Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ until 0.1.0.
Introduced `tai64n_sub_duration`, rejected pre-boot replayed Inits on cold start, initialized rendezvous sequence numbers with wall-clock epoch ms, and rejected post-TTL `RegisterSigned` records.

### Performance
- **Configurable UMEM page pre-faulting (`MAP_POPULATE` vs lazy on-demand) & tunable `BatchUdpSocket` burst sizing (`crates/yip-io`, `bin/yipd`, `crates/yip-bench`, #173).**
Added `UmemPoolConfig` and `UmemPool::new_lazy` / `with_config` / `new_slabs_with_config` to eliminate startup latency and resident set size (RSS) bloat on memory-constrained devices. Allowing on-demand lazy paging drops UMEM initialization time from 1,590.98 µs down to **7.25 µs (219.5x faster startup)** while retaining optional page pre-faulting (`pre_fault: true`) and physical memory page locking (`libc::mlock`) for zero-jitter bare-metal environments. Generalized `BatchUdpSocket::recvmmsg_batch<const N: usize>` and `sendmmsg_burst<const N: usize>` across const-generic burst sizes, adding `BATCH_SIZE_64 = 64` and `BATCH_SIZE_128 = 128` constants to maximize single-queue syscall amortization at 40G+ line rates. Added runtime environment control in `bin/yipd` via `YIP_UMEM_LAZY` and `YIP_UMEM_MLOCK`.
- **Per-core UMEM slab allocation & lock-free ring recycling for AF_XDP (`crates/yip-io`, `bin/yipd`, `crates/yip-bench`, #172).**
Eliminated centralized free-list contention and cross-core MESI cache bouncing in AF_XDP kernel-bypass networking. Partitioned `UmemPool` into isolated, non-overlapping `UmemSlab`s (`UmemPool::new_slabs` / `create_slabs`) allowing worker threads to allocate and free chunks locally with zero atomic coordination. Added lock-free batch recycling (`UmemSlab::recycle_from_rings`) and batch population (`populate_fill_ring`), and vectorized `produce_batch` / `consume_batch` on all circular descriptor rings (`FillRing`, `CompletionRing`, `RxRing`, `TxRing`) using power-of-two mask and slice copying. Boosted circular ring batch throughput from 1,438 Mops/s to **4,057 Mops/s (0.25 ns/op)** and scaled 8-worker throughput to **19.60 Gbps (1.914 Mpps)** with 0 packet drops and 0 reordering.
- **Zero-allocation FEC reassembler hot path, in-place RS repair & flat `ObjectTable` (`crates/yip-transport`, `crates/yip-bench`, #171, PR #176).**
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Because throughput is inversely proportional to the square root of packet loss p
- **Zero-Copy AF_XDP (XSK)**: Direct UMEM memory ring driver with per-core slab partitioning and lock-free ring recycling bypasses the Linux network stack, sustaining 40.27 Gbps and 3.93 Mpps across 8 CPU cores.
- **Asynchronous `io_uring`**: High-performance multishot ring polling drives high packet rates without thread contention or syscall overhead.
- **Multi-Queue TUN Sharding**: `IFF_MULTI_QUEUE` worker isolation maps packet flows to dedicated CPU cores via lock-free SPSC ring buffers.
- **Vectorized Socket I/O**: Batched `recvmmsg` and `sendmmsg` with `UDP_SEGMENT` Generic Segmentation Offload (GSO) optimize standard POSIX network paths.
- **Vectorized Socket I/O**: Batched `recvmmsg` and `sendmmsg` (tunable 32/64/128-packet bursts) with `UDP_SEGMENT` Generic Segmentation Offload (GSO) optimize standard POSIX network paths.
- **Flat Open-Addressing Tables**: Replaces dynamic pointer maps with bounded flat slot tables using SplitMix64 fast hashing and backward-shift deletion with zero tombstones.

### 4. Post-Quantum Cryptography & Identity
Expand Down Expand Up @@ -206,13 +206,13 @@ Deterministic benchmarks measured across multi-region cloud WANs (AWS `us-east-1
<!-- BENCHMARK-TABLE-START -->

<!-- generated by crates/yip-bench/wan/collect.sh -->
*Two 1-vCPU Debian 13 VPSes, ~60.939 ms apart, 2026-10-26. yip trades raw clean-path throughput for loss resilience (see the FEC row).*
*Two 1-vCPU Debian 13 VPSes, ~54.365 ms apart, 2026-10-27. yip trades raw clean-path throughput for loss resilience (see the FEC row).*

| | TCP 1-stream | UDP loss (200M) | effective loss @10% injected |
|---|--:|--:|--:|
| **yip** | 274.2 Mbit/s | 0.00% | 1% |
| **WireGuard** | 451.8 Mbit/s | 0.01% | 11% |
| **OpenVPN** | 34.0 Mbit/s | 0.04% | 10% |
| **yip** | 253.7 Mbit/s | 0.00% | 0% |
| **WireGuard** | 453.1 Mbit/s | 0.00% | 7% |
| **OpenVPN** | 32.6 Mbit/s | 0.04% | 8% |

<!-- BENCHMARK-TABLE-END -->

Expand Down
4 changes: 3 additions & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ maintainer.
wire-auth 64-bit counter-bound FEC reassembly with pre-AEAD anti-replay gating, and
bidirectional flow accounting in the traffic classifier (#11).
- **Multi-core throughput & kernel-bypass** — multi-queue TUN worker sharding (`IFF_MULTI_QUEUE`),
core-pinned flow hashing, lock-free chunked nonce dispensers, circular replay windows, and
core-pinned flow hashing, lock-free chunked nonce dispensers, circular replay windows,
per-core UMEM slab partitioning with vectorized ring recycling (#172), configurable lazy on-demand paging vs `MAP_POPULATE` and `mlock` page pinning (#173),
tunable 32/64/128-datagram syscall burst sizing in `BatchUdpSocket` (#173), and
AF_XDP zero-copy driver (over 40 Gbps aggregate throughput, 5.3x higher goodput than kernel
WireGuard under 5% packet loss).
- **Control plane & mesh routing** — multi-peer routing, self-certifying key-derived addresses
Expand Down
40 changes: 20 additions & 20 deletions assets/bench-fec-recovery.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading