From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: epoll improvements
Date: Thu, 16 Oct 2014 14:17:59 +0200 [thread overview]
Message-ID: <20141016121759.GA28008@kroah.com> (raw)
In-Reply-To: <trinity-842dea81-708d-4ef5-86ad-68daf6f7d7e5-1413461344834@3capp-mailcom-bs07>
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 timeout is 0,
> the latency is down to 5usec, otherwise if it enters the waitqueue
> the latency goes up to 10-25usec, which impact the application performance.
>
> Looking at the code there is something like a todo ("Is it worth to try to dig for events ?")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/eventpoll.c?id=refs/tags/v3.17#n1650
>
> Anyone knows how the situation can be improved?
> in theory having something like a 50usec spin loop
> checking for events before entering in the waitqueue should improve the situation.
>
> suggestion? patches?
The epoll code is subtle, tricky, and very very difficult to modify. I
suggest trying your suggestion and seeing if it helps any. But be
prepared to go down a long rabbit-hole in this area of the kernel.
Enjoy the trip! :)
greg k-h
next prev parent reply other threads:[~2014-10-16 12:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 12:09 epoll improvements Nev Ikte
2014-10-16 12:17 ` Greg KH [this message]
2014-10-16 12:48 ` Jason Ball
2014-10-16 17:02 ` Valdis.Kletnieks at vt.edu
2014-10-17 16:47 ` michi1 at michaelblizek.twilightparadox.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141016121759.GA28008@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.