lkml.org 
[lkml]   [1999]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Opening 5000 file descriptors in linux??
Date
Lokesh,

I think you might find it problematic opening so many file descriptors.
You should consider the activity of the client, my guess is not all clients
will be active at the same time. Therefore you could have a pool of say
100 sockets (can be any number) that you share amongst the 5000 or
20000 clients. In this case each client has a type of virtual connection
in the sense that the client may not actually have an open socket but it
looks and acts as if it did.

Obviously when either the server or the client needs to send anything you
must re-establish the socket connection.

Alternatively, you might be able to define a protocol that sends packets of
data between the client and server. In this way, the socket is only open
while the packet is being sent. This might get around your problem of
having so many sockets open at once, but the process of opening and
closing so many socket connection might be over whelming.

Hope this helps.
Cheers
Craig.


----------
> From: Lokesh Setia <eeu95176@cse.iitd.ernet.in>
> To: linux-kernel@vger.rutgers.edu
> Cc: linux-gcc@vger.rutgers.edu
> Subject: Opening 5000 file descriptors in linux??
> Date: Sunday, March 28, 1999 5:10 PM
>
>
> [ please cc: a copy of the reply to eeu95176@cse.iitd.ernet.in as i am
not
> a member of this mailing list ].
>
> Hi,
>
> I am writing a program (somewhat similar to irc server) that would
> simultaneously open ~5000 sockets and talk to all these clients. As far
as
> i know a process can open only about 50-60 sockets (file descriptors).
>
> Will i have to open multiple processes with some form of IPC or shared
> memory, or can i configure a kernel to let a process open any amount of
> file descriptors. If yes, where in the kernel code should i change.
>
> Can a 200MHz pentium take the load of a process with 5000 open file
> descriptors, or will it just crash. Also which of the above 2 approaches
> (single process or multiple process) will result in better utiliziation
> and better stability.
>
> What if the number of sockets is 20000 instead of 5000? ;-)
>
> Thanx,
>
> Lokesh.
>

-
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.336 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site