kqueue versus epoll: A Performance Comparison Shrikant Giridhar Cindy Zhang Abstract Modern high-performance webserver architectures often use an event driven concurrency model for flexibility and performance reasons. These server architectures have evolved over time from using a single-threaded implementation us- ing events to a hybrid model using a combination of event notifications and worker thread pools to handle potentially blocking requests. As web applications grow in popularity and server workloads become more diverse, scalability has become an important design aspect for industrial servers. Kernel vendors have responded to the scalability limitations of traditional event notification system calls by introducing their own flavors of scalable notification mechanisms - epoll in Linux and kqueue in BSD derived distributions. In this paper, we discuss the architecture of these system calls and evaluate their real-world performance using a popular high-performance webserver (node.js) on Linux and FreeBSD. In doing so, we also compare their claims of scalability against POSIX I/O notification calls - select and poll based on previous literature and using a set of macro and micro benchmarks of our own.