What is the essential difference between event library (libevent/libuv/...) and async I/O (libaio, liburing)?

900 Views Asked by At

For high-performance I/O, some techniques are often used:

  • poll/select/epoll/kqueue: They are the same type of system calls that support I/O multiplexing.
  • libevent/libev/libuv: They are cross-platform. I think they wrap the above system calls and eventually implement event-driven.
  • libaio/libeio/liburing: They provide support for asynchronous IO.

It seems that all of them can achieve high performance, and libevent/libev/libuv is probabily to be better than poll/select/epoll/kqueue in terms of ease of use and cross-platform. But both libevent/libev/libuv and libaio/libeio/liburing seem to be excellent and seem to be interchangeable.

What is the essential difference between event library and async I/O? Which one is better to use in which situation?

Thanks.

1

There are 1 best solutions below

0
Mascarpone On

Check my other answer: io_uring in multithreaded process

io_uring is the only one who can do real async io without a threadpool.