
23 Dec
2005
23 Dec
'05
2:22 a.m.
On Thu, 22 Dec 2005 21:16:11 -0000 (GMT) "christopher baus" <christopher@baus.net> wrote:
Interesting. Could you give an example where select() is faster than epoll()? I suspect it is with smaller numbers of file descriptors.
OK. I have a small example (but I'm out of time to do more). The problem with epoll() is when you have a large number of FDs that are all ready. If you epoll_wait() for as many events as you have FDs you get MUCH worse performance than poll() or select. If you just wait on 1 FD with epoll_wait(), you can call the system call a bunch more times, but then again, you have to make a system call for every FD that is ready, which is more expensive over lots of FDs. Does that make sense?