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

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.

[1]  Keith Bostic,et al.  The design and implementa-tion of the 4.4BSD operating system , 1996 .

[2]  George C. Necula,et al.  Capriccio: scalable threads for internet services , 2003, SOSP '03.

[3]  Peter Druschel,et al.  A Scalable and Explicit Event Delivery Mechanism for UNIX , 1999, USENIX Annual Technical Conference, General Track.

[4]  Chuck Lever,et al.  Analyzing the Overload Behavior of a Simple Web Server , 2000, Annual Linux Showcase & Conference.

[5]  Abhishek Chandra,et al.  Scalability of Linux Event-Dispatch Mechanisms , 2000, USENIX Annual Technical Conference, General Track.

[6]  Chuck Lever,et al.  Scalable Network I/O in Linux , 2000, USENIX Annual Technical Conference, FREENIX Track.

[7]  Jonathan Lemon Kqueue - A Generic and Scalable Event Notification Facility , 2001, USENIX Annual Technical Conference, FREENIX Track.

[8]  W. Richard Stevens,et al.  Unix network programming , 1990, CCRV.

[9]  Samuel J. Leffler,et al.  The design and implementation of the 4.3 BSD Unix operating system , 1991, Addison-Wesley series in computer science.