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.

4

2 回答 2

5

根据伯克利大学的说法,kqueue 优于 epoll,主要是因为 epoll 不支持在单个系统调用中进行多个兴趣更新,而 kqueue 可以使用 kevent() 来做到这一点。

还有一篇关于 2 和性能比较之间差异的技术论文。

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

于 2013-03-31T17:56:18.190 回答
4

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

于 2010-08-29T18:05:59.067 回答