A fast polling I/O implementation with real-time signals

Eiji Kawai, Y. Kadobayashi, Suguru Yamaguchi · 2004

This study revisits the scalability issue of polling I/O, i.e., select () and poll (). Although polling I/O was an efficient and hence popular I/O multiplexing mechanism, it is believed inadequate today to handle tens of thousands of concurrent TCP connections because the scanning cost of such a large connection list is overwhelmingly high. However, the real problem of polling I/O is not in the semantics itself but in various implementation factors such as memory allocations and copies to process a system call, pointer operations and function calls through VFS, and wait channel management to handle events. To mitigate these overheads and reinstate polling I/O as an efficient I/O multiplexing mechanism, we have developed a fast polling I/O library based on POSIX real-time signals. This library implements the full functionality of polling I/O by managing the state transition of each connection notified with realtime signals. Traditional polling I/O has a weakness especially when it polls a small number of active connections together with a huge number of idle ones. Our polling I/O library is proved to achieve high performance in that situation.

Read the paper · More papers on PaperTik