fork, select & socket performance ?
by Ragnar Hojland Espinosa other posts by this author
Feb 18 2003 3:32PM messages near this date
Re: Newbie question re. morphs in a holder
|
Re: fork, select & socket performance ?
Another basic question I'd love some orientation with:
I have a little question on fork permormance. In my little TCP/IP program I
plan to have, roughly:
- listener process
put new client socket in a shared queue
- other process
read-block on listener shared queue
fork a reader and a writer for each client
Given I can have over 500 clients at a time, with bursts of about 60 new
clients / second , will all this forking be ok? Or should I build a, say,
100 process pool and reuse them? Or is there a better way to do it?
Another thing, what class should I look at if I want to do something like
select, either C or even perlish?
$read_fds = IO::Select-> new();
$read_fds-> add ($socket);
my @read_set = $read_fds-> can_read;
foreach my $read_socket (@read_set) {
# ...
}
--
Ragnar Hojland - Project Manager
Linalco "Especialistas Linux y en Software Libre"
http://www.linalco.com Tel: +34-91-5970074 Fax: +34-91-5970083
Thread:
Ragnar Hojland Espinosa
Ned Konz
|