Subject: Re: select() question
To: Erik Huizing <>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: netbsd-users
Date: 08/14/2001 15:51:05
Erik Huizing <> writes:

> Quick question about select:
>   is it better to use select on a large (possibly >5,000) number of
> sockets, 

... you can't do that. The select() interface only allows you to deal
with the first FD_SETSIZE (256) descriptors. You could do it with
poll(), though.

> or to split the job up amount, say, 10 or 20 threads, where each
> thread has a more manageable list. 

This might be better (less copyin overhead), if you can find a thread
package that works well with select [working on it, I promise!].

The kqueue interface would be better than any of those options, but
it's not quite integrated yet.

        - Nathan