TOC
Previous
Next
The epoll API
Why
Limitations of I/O multiplexing
(select() and poll())
-
portable techniques, but...
-
scale
poorly:
-
The problem: kernel does not
"remember" which file descriptors are
being monitored between calls:
-
each call transfers list of all
fds to kernel space, and back again;
-
kernel checks all file descriptors; and
-
caller must check all fds in returned list.
-
Performance scales
(roughly) linearly with number of file descriptors
Even if most fds are
idle (a common case).
-
Not adequate for monitoring
thousands of file descriptors (e.g., high-load network server).
(C) 2006, Michael Kerrisk