Skip to content

samcode206/io_uring-vs-epoll-tcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IO_uring vs.Epoll: A Comparative Study of TCP Server IO Performance

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.

Prerequisites

  • liburing
  • Linux Kernel version 6.1 or above (earlier versions may work but are untested)

benchmarks

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.

Observations

io_uring outperforms epoll in request-response workloads but faces challenges in keeping up with epoll when clients are streaming data.

Streaming client

256 byte payloads

512 byte payloads

1kb payloads

4kb payloads

Request-response

256 byte req-res payloads

512 byte req-res payloads

To Run either server locally

  1. Ensure that liburing is installed.
  2. 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.

About

IO_URING vs epoll network IO performance tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published