From: Ingo Oeser <ioe-lkml@rameria.de>
To: Arunachalam <arunachalamp@huawei.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: epoll,threading
Date: Sat, 26 May 2007 15:15:57 +0200 [thread overview]
Message-ID: <200705261515.58354.ioe-lkml@rameria.de> (raw)
In-Reply-To: <10815949.post@talk.nabble.com>
Hi Arunachalam,
On Saturday 26 May 2007, Arunachalam wrote:
> I want to know in detail about , what the events (epoll or /dev/poll or
> select ) achieve in contrast to thread per client.
>
> i can have a thread per client and use send and recv system call directly
> right? Why do i go for these event mechanisms?
Try 30.000 clients or more on a x86 32bit box.
That will show you the difference quite nicely :-)
More seriously: Thread per client scales only to a certain amount of clients
per RAM. If you like to scale beyond that to like to minimize your state
per client. If you have a thread then you have a task structure as
unswappable memory in kernel, a per-thread stack, which is reducing
your virtual memory per process (you have only around 3GB of virtual
memory per process in Linux x86 32bit).
So one uses a process or thread pool to scale beyond that.
Pool size is typically related to the amount of CPU cores in the system.
Regards
Ingo Oeser
next prev parent reply other threads:[~2007-05-26 13:15 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 ` Ingo Oeser [this message]
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 ` epoll,threading Tejun Heo
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=200705261515.58354.ioe-lkml@rameria.de \
--to=ioe-lkml@rameria.de \
--cc=arunachalamp@huawei.com \
--cc=linux-kernel@vger.kernel.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 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®