On Sat, 5 Sep 2026 00:28:19 +0300
aerosouund
[...]
The changes reliably yield a roughly 2x speedup on the TX path (container to host).
Numbers were obtained through iperf3 with the following methodology and results:
Pasta command: ./pasta -f --runas 0:0 --map-guest-addr 192.168.0.5 --vhost-kernel on --config-net 2729785
Host: iperf3 -s1J
Container: iperf3 -c 192.168.0.5 -t 10 -P4 -l 1M -w 32M -i1
With --vhost-kernel on:
[SUM] 0.00-10.00 sec 1.36 GBytes 1.17 Gbits/sec 3643 sender [SUM] 0.00-10.00 sec 1.16 GBytes 999 Mbits/sec receiver
With --vhost-kernel off:
[SUM] 0.00-10.00 sec 700 MBytes 587 Mbits/sec 3556 sender [SUM] 0.00-10.10 sec 495 MBytes 411 Mbits/sec receiver
Not a review and not a real test but I just quickly ran (once) the usual perf/pasta_tcp tests with and without this series. Baseline:
pasta: throughput and latency (connections via tap) Throughput in Gbps, latency in µs, 2 threads at 3.6 GHz MTU: | 1500B | 4000B | 16384B | 65520B | |--------|--------|--------|--------| TCP throughput over IPv6: ns to host | 2.7 | 4.2 | 4.5 | 18.7 | TCP RR latency over IPv6: ns to host | - | - | - | 24 | TCP CRR latency over IPv6: ns to host | - | - | - | 84 | |--------|--------|--------|--------| TCP throughput over IPv4: ns to host | 2.5 | 4.2 | 2.8 | 16.8 | TCP RR latency over IPv4: ns to host | - | - | - | 25 | TCP CRR latency over IPv4: ns to host | - | - | - | 72 | |--------|--------|--------|--------| TCP throughput over IPv6: host to ns | - | - | - | 14.2 | TCP RR latency over IPv6: host to ns | - | - | - | 26 | TCP CRR latency over IPv6: host to ns | - | - | - | 74 | |--------|--------|--------|--------| TCP throughput over IPv4: host to ns | - | - | - | 14.3 | TCP RR latency over IPv4: host to ns | - | - | - | 28 | TCP CRR latency over IPv4: host to ns | - | - | - | 82 | '--------'--------'--------'--------'
with this series:
pasta: throughput and latency (connections via tap) Throughput in Gbps, latency in µs, 2 threads at 3.6 GHz MTU: | 1500B | 4000B | 16384B | 65520B | |--------|--------|--------|--------| TCP throughput over IPv6: ns to host | 9.3 | 5.5 | 22.6 | 25.1 | TCP RR latency over IPv6: ns to host | - | - | - | 35 | TCP CRR latency over IPv6: ns to host | - | - | - | 93 | |--------|--------|--------|--------| TCP throughput over IPv4: ns to host | 9.3 | 5.2 | 10.9 | 24.8 | TCP RR latency over IPv4: ns to host | - | - | - | 30 | TCP CRR latency over IPv4: ns to host | - | - | - | 94 | |--------|--------|--------|--------| TCP throughput over IPv6: host to ns | - | - | - | 19.2 | TCP RR latency over IPv6: host to ns | - | - | - | 33 | TCP CRR latency over IPv6: host to ns | - | - | - | 90 | |--------|--------|--------|--------| TCP throughput over IPv4: host to ns | - | - | - | 17.4 | TCP RR latency over IPv4: host to ns | - | - | - | 35 | TCP CRR latency over IPv4: host to ns | - | - | - | 86 | '--------'--------'--------'--------'
...latency increases a little but it still looks pretty good to me. Throughput wise, for higher MTUs it's definitely an improvement in both directions, and for lower MTUs we even hit 4x increases, that's quite impressive. I haven't checked if we need to tweak iperf3 parameters (or our buffers?) to make this scale for large MTUs, but I guess that might be the case. -- Stefano