Check out my first novel, midnight's simulacra!

Epoll

From dankwiki
Revision as of 02:58, 25 June 2009 by Dank (talk | contribs)

I don't like epoll so much as FreeBSD's kqueue, although many of its deficiencies have been overcome with the 2.6.25 kernel release and its addition of timerfd_* and signalfd_* functionality (LWN had a good article regarding timerfd here). Note that these latter functions require glibc version 2.8 or later, or use of the syscall() multiplexer.

System Limits

  • /proc/sys/fs/epoll/max_user_watches, since Linux 2.6.28, "specifies a limit on the total number of file descriptors that a user can register across all epoll instances on the system. The limit is per real user ID. Each registered file descriptor costs roughly 90 bytes on a 32-bit kernel, and roughly 160 bytes on a 64-bit kernel. Currently, the default value for max_user_watches is 1/25 (4%) of the available low memory, divided by the registration cost in bytes."