From: Dan Kegel <dank@alumni.caltech.edu>
To: angelcode@myrealbox.com, linux-kernel@vger.kernel.org
Subject: Re: Poll and Select not scaling
Date: Wed, 10 Jan 2001 15:46:57 -0800 [thread overview]
Message-ID: <3A5CF471.17C03480@alumni.caltech.edu> (raw)
Micah wrote:
> I have been trying to increase the scalabilty of
> an email server that has been ported to Linux. It
> was originally written for Netware, and there we
> are able to provide over 30,000 connections at any
> given time. On Linux however select stops working
> after the first 1024 connections. I have changed
> include/linux/fs.h and updated NR_FILE to be 81920.
On modern kernels, you no longer need to change NR_FILE;
all you need to do is increase ulimit -n and a few proc
entries; see
http://www.kegel.com/c10k.html#limits.filehandles
> In test applications I have been able to create well
> over 30,000 connections but I am unable to do either
> a select or a poll on them.
select() is usually limited to 1024 file descriptors, so
poll() is a slightly better choice. However, although
it can handle 30000 file descriptors, the performance sucks;
see http://www.kegel.com/dkftpbench/Poller_bench.html#results
You may wish to use an alternative to poll().
See http://www.kegel.com/c10k.html#strategies for a list of possibilities.
The only one that performs well on Linux at 30000 fds would be
the real time signal stuff. That's a little tricky to use.
Or you could recode your app to use one thread or process
per 1000 fd's.
Solaris and FreeBSD both offer friendlier poll alternatives
that perform quite well. You might consider using one of those
operating systems if all else fails.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2001-01-11 0:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-10 23:46 Dan Kegel [this message]
2001-01-11 20:35 ` Poll and Select not scaling dean gaudet
-- strict thread matches above, loose matches on Subject: below --
2001-01-11 23:07 Micah Gorrell
2001-01-10 23:21 Micah Gorrell
2001-01-10 23:37 ` Chris Wedgwood
2001-01-11 2:24 ` Bill Wendling
2001-01-11 22:41 ` David Schwartz
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=3A5CF471.17C03480@alumni.caltech.edu \
--to=dank@alumni.caltech.edu \
--cc=angelcode@myrealbox.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