mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy Tarreau <willy@w.ods.org>
To: kyle@pbx.org
Cc: Davide Libenzi <davidel@xmailserver.org>,
	Heikki Orsila <shd@zakalwe.fi>,
	linux-kernel@vger.kernel.org
Subject: Re: accept()ing socket connections with level triggered epoll
Date: Thu, 27 Apr 2006 06:07:23 +0200	[thread overview]
Message-ID: <20060427040723.GG13027@w.ods.org> (raw)
In-Reply-To: <20060427000520.GA10880@www.t3inc.us>

On Wed, Apr 26, 2006 at 06:05:20PM -0600, kyle@pbx.org wrote:
> On Wed, Apr 26, 2006 at 03:14:16PM -0700, Davide Libenzi wrote:
> > 
> > Correct, if it's LT you have to get the event because before returning from 
> > epoll_wait(), the event is automatically re-armed if f_op->poll() returns it. 
> > Can you post the *minimal* test code for this case?
> > 
> > - Davide
> > 
> 
> I tried reducing the code I have to the minimum necessary to demonstrate the
> problem.  It went away, I'm afraid.  Since I'm already aware of a workaround
> (call accept in a loop until you get EAGAIN), I guess I'll just forget about
> it.  Unfortunately I can't post the full code, not that you'd want to dig
> through all of it anyway.

Sorry, I misunderstood you the first time. I thought that it was *when*
your accept looped that you encountered the problem. If you need performance,
I *really* encourage you to loop on accept() as much as you can. Missing an
accept() and reading EAGAIN is cheap, while looping through all your event
loop is usually more expensive. In haproxy, I had performance problems 5
years ago, I could not get above 1500-2000 sessions/s because I was doing
one accept at a time. After putting a small "while" loop around, it
immediately jumped over 10000.

Regards,
Willy


  reply	other threads:[~2006-04-27  4:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-26 20:55 kyle
2006-04-26 21:11 ` Heikki Orsila
2006-04-26 21:14 ` Davide Libenzi
2006-04-27  0:05   ` kyle
2006-04-27  4:07     ` Willy Tarreau [this message]
2006-04-26 21:20 ` Willy Tarreau

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=20060427040723.GG13027@w.ods.org \
    --to=willy@w.ods.org \
    --cc=davidel@xmailserver.org \
    --cc=kyle@pbx.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shd@zakalwe.fi \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®