Subject: Re: select() question
To: Erik Huizing <huizing@cpsc.ucalgary.ca>
From: Perry E. Metzger <perry@piermont.com>
List: tech-perform
Date: 08/14/2001 15:48:32
Erik Huizing <huizing@cpsc.ucalgary.ca> writes:
> Quick question about select:
>   is it better to use select on a large (possibly >5,000) number of
> sockets, or to split the job up amount, say, 10 or 20 threads, where each
> thread has a more manageable list. If it makes any difference, each socket
> sends something ata fairly low rate (>10 seconds between transmissions)
> and the packets are small (<100 bytes).

1) We don't have a pthreads implementation with kernel assists yet, so
   that will suck for you.
2) The right solution is really the kqueue API. Unfortunately, the
   code is currently on a branch, not in the mainline, but it should
   be out and available "soon".
3) Meanwhile, I'd use select until kqueue is available.

Perry