This repository houses a comparison between two TCP Echo Server implementations, adhering to RFC862. The primary objective is to assess the performance of Linux's io_uring under intense network I/O workloads in contrast to the well-established epoll mechanism.
- liburing
- Linux Kernel version 6.1 or above (earlier versions may work but are untested)
Benchmark tests were conducted in two different scenarios to simulate common Network I/O workloads:
- Streaming Client: The client continuously writes data without waiting for an echo.
- Request-Response Client: The client writes data, waits for a response, and then initiates the next write.
io_uring outperforms epoll in request-response workloads but faces challenges in keeping up with epoll when clients are streaming data.
To Run either server locally
- Ensure that liburing is installed.
- Adjust the buffer and max event/max connection settings in the source code for each server as necessary.
These tests were executed on a 11th Gen Intel® Core™ i9-11900K @ 3.50GHz
debian 12 (running directly on hardware no vm), with the servers pinned to CPU 15 via taskset -cp 15 {{pid}}
. The kernel parameters were set as mitigations=off isolcpus=15
.