Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any major performance differences between epoll and kqueue?

My development machine is a MacBook (which of course has kqueue). However, in production we're running Linux (which of course uses epoll). Obviously, to know the performance characteristics of my code I need to run it using epoll. That said, is performance that I see under kqueue a decent approximation of what I'll see with epoll? Or are there any situations where performance may be significantly different? For the most part, it seems that kqueue and epoll are pretty much similar in terms of performance, but I haven't really done very thorough testing.

If it makes a difference, I'm using tornado in Python.

like image 617
Jason Baker Avatar asked Jan 22 '23 12:01

Jason Baker


2 Answers

kqueue outperforms epoll according to Berkeley University mainly because epoll does not support multiple interest updates in a single system call, while kqueue can do that using kevent().

There is a technical paper on the differences between the 2 and performance comparison also.

http://www.eecs.berkeley.edu/~sangjin/2012/12/21/epoll-vs-kqueue.html

like image 162
Omar S. Avatar answered Feb 01 '23 16:02

Omar S.


http://www.daemonforums.org/showthread.php?t=2124

like image 35
Vladislav Rastrusny Avatar answered Feb 01 '23 16:02

Vladislav Rastrusny