[lkml]   [2001]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Poll and Select not scaling
On Wed, Jan 10, 2001 at 04:21:17PM -0700, Micah Gorrell 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. 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. Does any one know what
I can do to fix this?

Which verion of linux and what libc are you using? For some time now
linux has supported the ability to select and poll on more than 102
FDs and several applications do indeed use this (squid for example).

For large numbers of FDs you probably want poll, which shouldn't give
you any problems. As you point out with sleect you need to redefine
NR_FILE or somesuch -- but hacking the kernel headers shouldn't be
necessary and may not help as libc will stull potentially get the
wrong value.

See where libc gets it from, I think recent libc version may allow
you to do something like:

#define NR_FILE <large-number>
#include <blah.h>
#include <blem.h>

but I could be wrong. Using poll you you have no problems.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.048 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site