Subject: Re: bumping default open descriptors
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 04/02/2004 12:43:00
> i think it's beyond time netbsd increased the default fd's per
> process.  i'd like to make a change along these lines, but first i'd
> like to collect some input on: [...]

I'd also recommend changing the default FD_SETSIZE value, especially if
you raise the default fd limit as high as 256.

Yes, userland _can_ define FD_SETSIZE higher before #includes, but
generally doesn't.  I had to help debug a peculiar problem recently
that ended up being code using select and fd_sets but not checking that
file descriptors were < FD_SETSIZE.  Guess what happens when you
allocate an fd_set on the stack and then use FD_SET/FD_CLR with file
descriptors over FD_SETSIZE with it!

Yes, such code is arguably broken.  But the reality is it's out there
(php on a webserver in the case I dealt with, not some bit of esoterica
with a userbase you can count on one hand.  This is a problem poll()
lacks; such experiences are leading me to a "select() delenda est"
stance, even despite the code complication poll() produces IME.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B