public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Willy Tarreau <w@1wt.eu>
Cc: davids@webmaster.com, linux-kernel@vger.kernel.org
Subject: Re: epoll,threading
Date: Wed, 30 May 2007 22:42:04 +0900	[thread overview]
Message-ID: <465D7F2C.4040203@gmail.com> (raw)
In-Reply-To: <20070530131221.GC19105@1wt.eu>

Hello,

Willy Tarreau wrote:
>> The thing is that the synchronization overhead is something you'll have
>> to pay anyway to support multiple processors.
> 
> But you don't need to sync *everything*. It is doable to have 1 thread
> per processor, each with their own data, and sync the minimum information
> (eg: statistics).

Agreed it's doable but the list of things to synchronize tends to grow
and it's really hurts when it does.  Also, the list becomes much less
different between async and threaded model with multi processor support.

[--snip--]
>>  You need to restrict per-thread
>> stack size and use epoll for idle threads, if you wanna scale.  Workers
>> + async monitoring of idle clients scale pretty well.
> 
> I agree with a small pool of workers. But they must be dedicated to CPU
> only, and perform no I/O. Then you can have 1 thread/CPU.

Well, if you go that far, it's basically async model with multiprocessor
support.  Not my favorite one.  :-)

>>> However, I agree that few uses really require to spend time writing
>>> and debugging async programs.
>> Yeap, also there are several things which just are too painful in async
>> server - e.g. adding coordination with another server (virus scan,
>> sharing cached data), implementing pluggable extension framwork for
>> third parties (and what happens if they should be able to stack!), and
>> maintaining the damn thing while trying to add a few features.  :-)
>>
>> IMHO, complex pure async server doesn't really make sense anymore.
> 
> That's clearly not my opinion, but I don't want to enter a flamewar on
> the subject, it's not interesting. As long as people like us will push
> the system to limits using either model, at least there will be
> references for comparisons :-)

Yeap, it's getting off-topic.  Let's see what future brings.  :-)

Thanks.

-- 
tejun

      reply	other threads:[~2007-05-30 13:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-26 12:27 epoll,threading Arunachalam
2007-05-26 13:15 ` epoll,threading Ingo Oeser
2007-05-26 23:01 ` epoll,threading David Schwartz
2007-05-29 19:35   ` epoll,threading Tejun Heo
2007-05-30  7:25     ` epoll,threading Willy Tarreau
2007-05-30  7:50       ` epoll,threading David Schwartz
2007-05-30  8:07       ` epoll,threading David Schwartz
2007-05-30  8:12         ` Change IP TOS inside ethernet driver gshan
2007-05-30 12:58         ` epoll,threading Willy Tarreau
2007-05-30 10:12       ` epoll,threading Tejun Heo
2007-05-30 13:12         ` epoll,threading Willy Tarreau
2007-05-30 13:42           ` Tejun Heo [this message]

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=465D7F2C.4040203@gmail.com \
    --to=htejun@gmail.com \
    --cc=davids@webmaster.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=w@1wt.eu \
    /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