From time to time I am playing around with iouring for networking.. espacially tcp connections.
Today I did a basic comparison on good ol` tokio vs iouring (using registered buffers, buf_ring and recv_multishot). My goal was to receive as many bytes as possible per second.
I was pretty sure I wont reach tokio`s battle-tested performance in an afternoon but even so I was surprised that tokio reached ~2 times the throughput.
From time to time I am playing around with iouring for networking.. espacially tcp connections. Today I did a basic comparison on good ol` tokio vs iouring (using registered buffers, buf_ring and recv_multishot). My goal was to receive as many bytes as possible per second.
I was pretty sure I wont reach tokio`s battle-tested performance in an afternoon but even so I was surprised that tokio reached ~2 times the throughput.
Tokio: ~110 Gbit/s io-uring: ~55 GBit/s
Network: loopback (127.0.0.1) Kernel: 6.9.6-zen1-1-zen CPU: AMD Ryzen 9 5900X (24) @ 3.700GHz
I used btop to meassure the throughput and #290 for the iouring buf_ring.
Maybe someone here can point out any obvious skill issues on my side or give some general advice.
iouring_tcp_sink.rs
tokio_tcp_sink.rs
tokio_tcp_src.rs