Hasty Briefsbeta

Bilingual

Epoll's Handle-Centric Design vs. Kqueue's Filter-Centric Design (2021)

4 hours ago
  • #kqueue
  • #scalability
  • #epoll
  • The article discusses the technical debt associated with BSD's kqueue compared to Linux's epoll.
  • Originally, IRCDs used select for polling sockets, which had scalability issues due to design defects.
  • The poll syscall was introduced as a more efficient alternative to select, addressing some scalability issues.
  • kqueue was introduced in FreeBSD in 2000 as a kernel-assisted event notification system, supporting various event filters.
  • epoll was introduced in Linux in 2002, offering a composable design that monitors kernel handles.
  • The key difference between kqueue and epoll is that kqueue operates on event filters, while epoll focuses on kernel handles.
  • epoll's composable design allows it to monitor any kernel resource without modification, making it more flexible.
  • FreeBSD has started adopting Linux-like features, such as eventfd, indicating a potential shift in kqueue's design.