Re: Linux file descriptors

From: Dancer <dancer@dont-contact.us>
Date: Fri, 04 Jun 1999 13:57:54 +1000

Ben Bullock wrote:
>
> Dancer wrote:
> >
> > Edit /usr/include/gnu/types.h and change the the size of FD sets, then
> > configure and rebuild squid. Yes, it sucks....but it _does_ work.
>
> It certainly does!
>
> I do have a few more questions at this point:
> 1. Should the kernel be recompiled as well after types.h is modified?
No. Unfortunately /usr/include/gnu/types.h shadows the kernel's own
definition for FD_SETSIZE, which can cause some pretty bizarre
application crashes, if the types.h value is smaller than the one in the
kernel.

> 2. Should the original value of FD_SETSIZE be restored in types.h
> after squid has been compiled?

I don't. I leave it as is and it causes me no problems. Heavy select()
using applications can exhibit bad behaviour if the value they were
compiled with doesn't match that of the kernel, for differing values of
'bad'.

> 3. Are there any 'gotchas' that I should be aware of with regard to
> tinkering with types.h?

Not that I'm aware of.

Caveat/Disclaimer: This is all in my personal experience, running around
a hundred 2.0.36 servers with kernel 2.0.36 and that file-descriptor
patch. Long-term (uptime >95%) was erratic, and expanded file-descriptor
usage was ineffective until we made this change, which solved our
problems. YMMV. Be careful out there.

D
Received on Thu Jun 03 1999 - 21:43:05 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:46:43 MST