lkml.org 
[lkml]   [1999]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Opening 5000 file descriptors in linux??
On Tue, 30 Mar 1999, Gerold Jury wrote:

> Mike Shaver wrote:
>
> > 2.2.x with the large-fdset patches can handle > 10^5 descriptors, last I
> > heard from our server guys.
> >
> > Mike
> >
>
> Unfortunately there seems to be another problem somewhere else.
> Maby its a limitation of libc/glibc.
>
> I wrote an application that tries to open as many sockets as possible
> to simulate a big amount of clients to a server.
>

This shows that you can open 1021 sockets on my machine. Since 3
fds are already open, the default limitation seems to be 1024 as
expected.

#include <stdio.h>
#include <sys/socket.h>

main()
{
int s;
for(s = 0;; s++)
if(socket(AF_INET,SOCK_STREAM,0) <0) break;
printf("%d\n", s);
}



Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.4 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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