Alternative I/O models ( select / io_uring)
What’s epoll? - Julia Evans
What’s
O_NONBLOCK
? - Blocking I/O, Nonblocking I/O, And Epoll
- select / poll / epoll: practical difference for system architects
- No new code should be using select()
- In the vast majority of cases you would be choosing between poll and epoll/libevent.
- To use epoll, much more preparation is needed.
- select carries quite a few design flaws which make it undesirable as a polling mechanism in the modern networking application… is there is any reason to use select at all?
- The first reason is portability.
- select can - theoretically - handle the timeouts withing the one nanosecond precision, while both poll and epoll can only handle the one millisecond precision.
- Using select(2) - Use libev, Boost.Asio or other libraries.
- libev - A full-featured and high-performance event loop that is loosely modelled after libevent.
io_uring
- Waiting for many things at once with io_uring
- Do Files want to be Actors? - using his io_uring test server, like this one[0] claiming 180 GB/s of write throughput, which is fast enough to start blurring the lines with memory bandwidth. You can’t use mmap() for large persistent data because CPU silicon doesn’t support enough virtual memory
Written on March 26, 2021, Last update on November 21, 2024
linux
io-stream
file
socket
event
network