09 Mar '13, 3pm


EventMachine now supports epoll, bringing large increases in performance and scalability to Ruby programs. Epoll(7) is a alternative mechanism for multiplexed I/O that is available in Linux 2.6 kernels. It features significantly greater performance than the standard select(2) mechanism, when used in applications that require very large numbers of open I/O descriptors. EventMachine has always used select(2) because its behavior is well standardized and broadly supported. But select becomes unreasonably slow when a program has a very large number of file descriptors or sockets. Ruby’s version of select hardcodes a limit of 1024 descriptors per process, but heavily loaded processes will start to show performance degradation even after only a few hundred descriptors are in use. Epoll is an extended version of the poll(2) call, and it solves the problems with select. Programs b...

Full article: http://eventmachine.rubyforge.org/docs/EPOLL.html