On 1/23/07, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
Hi,
I was playing with epoll and changed driver to see if performance will
be better with it. Using ab utility i actually got worse performance
with epoll, i suspect may be i implemented it not very effectively.
How are you using ab? What exactly are you testing?
Remember: epoll() will increase the efficiency of the driver loop, but
you've already optimised that by applying the patch which accepts
multiple new connections on each iteration, so there will be
significantly less iterations to optimise.
And remember why poll() is inefficient: it's the scanning of the array
of active file descriptors. The whole array needs to be scanned even
if only one socket has a new event. Therefore you'd expect
performance problems to show up with extremely large numbers of active
connections. If you're not testing with concurrency of 1000 ~ 4000
connections, I wouldn't expect to see much of a difference, and that
will be tough with ab which uses one thread per connection, IIRC.
It's difficult to compare your epoll() implementation to the original
poll() as it's spread throughout the driver. Please consider using
something like NsPoll(), which is a very thin wrapper.