epoll improvements

2014-10-16 Thread Nev Ikte
Hi, I've a server using epoll and I've noticed that when the traffic is low, the epoll_wait() latency goes up. I've tried to reproduce it with a single client and basically, if ep_poll() is able to find an event or the timeout is 0, the latency is down to 5usec, otherwise if it enters the waitque

Re: epoll improvements

2014-10-16 Thread Greg KH
On Thu, Oct 16, 2014 at 02:09:05PM +0200, Nev Ikte wrote: > Hi, > > I've a server using epoll and I've noticed that when > the traffic is low, the epoll_wait() latency goes up. > > I've tried to reproduce it with a single client > and basically, if ep_poll() is able to find an event or the timeou

Re: epoll improvements

2014-10-16 Thread Jason Ball
The usual solution in low latency environments where the higher delays is an issue is to simply spin on a poll. If your polling multiple sockets then you need to cater for this in your code and avoid the kernel paths wherever possible.Depending on the hardware configuration consistent low late

Re: epoll improvements

2014-10-16 Thread Valdis . Kletnieks
On Thu, 16 Oct 2014 14:09:05 +0200, "Nev Ikte" said: > I've tried to reproduce it with a single client > and basically, if ep_poll() is able to find an event or the timeout is 0, > the latency is down to 5usec, otherwise if it enters the waitqueue > the latency goes up to 10-25usec, which impact t