4

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.

Jason Baker
  • 192,085
  • 135
  • 376
  • 510
  • I'm sure you will get some answers, but my suggestion is to find out yourself! I use a Macbook myself and what I would do is install Linux as a virtual machine in VMWare Fusion and implement epoll there. To keep the comparison fair I'd do a second virtual machine as FreeBSD and test kqueue with that. – Zan Lynx Apr 23 '11 at 00:48

2 Answers2

5

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

Omar
  • 8,374
  • 8
  • 39
  • 50
  • 2
    The link is broken. Try (1) http://web.archive.org/web/20190112082733/https://people.eecs.berkeley.edu/%7Esangjin/2012/12/21/epoll-vs-kqueue.html or (2) https://juejin.im/entry/6844903735517249544 . – Alexey Aug 02 '20 at 18:00
4

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

Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156
  • 1
    This doesn't quite answer my question. In the case that was benchmarked, it looks like the performance was about the same. But I'm mostly asking if there are any significant areas of difference between the two. Are there any edge cases where one performs wildly differently than the other? – Jason Baker Aug 29 '10 at 19:37