Re: How to increat [sic.] max open files?

Eric M. Boyd (boyd@interdim.com)
Fri, 3 Jan 1997 09:53:39 -0500 (EST)


On Fri, 3 Jan 1997, Richard B. Johnson wrote:

> On 3 Jan 1997 rdm@tad.micro.umn.edu wrote:

[snip - stuff about wanting to use 100 open sockets in one program]

>
> Do you really think that a single task can handle 100 sockets open to
> 100 clients in an efficient manner?
>
> Now, I don't KNOW what the number is. But I do KNOW that the number is
> not "N"! Having some kind of enforced limit causes one to design code
> rather than just winging it.
>
> Cheers,
> Dick Johnson

I run into the 256 fd limit all the time. I've written several
multi-threaded servers that are *designed* to handle several thousand
connections from several thousand clients at once. To test how many
connections these servers can handle, I need a process to *open* several
thousand connections to it.

Obviously there must be a limit on the number of file descriptors because
it's not possible to have an infinite number of fd's (we're talking about
32 or 64 bit computers. They have limits). But linux is horribly
crippled with it's inflexibility.

I have a Sun Ultra running Slowlaris 2.5.1, and the default hard
limit is 1024 fd's per process. If I want to up that limit though, I can
go in as root and raise it. I've set it as high as 10-20 thousand, and
used them. That kind of flexibility would be ideal for linux. I just
don't know how Slowlaris does it.

Eric

--------------------------------+----------------------------------------------
Eric Boyd (TSMA) | "It's easier to ask for
InterDimensions Corp. | forgiveness than for permission."
25 Ellery St. |
Cambridge Ma, 02138 | "640K ought to be enough for anybody."
617-661-4200 | -- Bill Gates, 1981
|
boyd@interdim.com |