Epoll and IO Multiplexing
August 15, 2021 · 834 words · 4 min · OS Linux Network IO
Let’s start with epoll. epoll is an I/O event notification mechanism in the Linux kernel, designed to replace select and poll. It aims to efficiently handle large numbers of file descriptors and supports the system’s maximum file open limit, providing excellent performance. Usage API epoll has three primary system calls: /** epoll_create * Creates an epoll instance and returns a file descriptor for it. * Needs to be closed afterward, as epfd also consumes the system's fd resources.