Which is better - epoll or libevent?

Jon Drukman jsd at cluttered.com
Fri Feb 3 20:39:24 UTC 2006

mike wrote:
>> If you're running 2.6, you almost certainly have epoll support in your
>> kernel and glibc, so you should be good to go.
> Wow, thanks for the fast reply - how can I check to make sure?

it's kind of ungraceful but i use strace on a running memcached to make 
really really sure.  if you see epoll_wait that's good.

epoll_wait(4, {{EPOLLIN, {u32=151560696, u64=151560696}}, {0, 
{u32=1656991, u64=8591591583}}, 
u64=10630490734198798}}, {EPOLLRDBAND|EPOLLWRNORM|EPOLLWRBAND|0x25b820, 
{u32=4276229452, u64=7093069751129420}}, {EPOLLRDNORM|EPOLLMSG|0x25c020, 
{u32=134681504, u64=60264223648}}, 
{u32=2473972, u64=10630490736672756}}, {0, {u32=4276229488, 
u64=7106843711247728}}, {EPOLLRDNORM|EPOLLMSG|0x25c020, {u32=134681504, 
u64=623326439139644320}}}, 8192, 3517) = 8

if you see regular poll that's not as good.

poll([{fd=3, events=POLLIN, revents=POLLIN}, (etc snipped)], 114, 3672) = 12

More information about the memcached mailing list