Re: poll and FD_SETSIZE

From: Darren Steven <dsteven@dont-contact.us>
Date: Fri, 04 Jun 1999 15:54:17 +1000

Henrik Nordstrom wrote:

> Darren Steven wrote:
>
> > This appears to happen because in include/squid.h, it says linux can't
> > change FD_SETSIZE, and the initialisation of the variable Squid_MaxFD
> > goes like this
> > Squid_MaxFD = SQUID_MAXFD (2048 from config)
> > if (FD_SETSIZE < Squid_MaxFD)
> > Squid_MaxFD = FD_SETSIZE
> >
> > I thought that the --enable-poll would free the need for FD_SETSIZE
> > limit, or is select still used somewhere ?.
>
> You are probably correct. The FD_SETSIZE check in main.c should be
> surrounded by #if !HAVE_POLL
>
> #if !HAVE_POLL
> if (FD_SETSIZE < Squid_MaxFD)
> Squid_MaxFD = FD_SETSIZE;
> #endif
>
> --
> Henrik Nordstrom
> Spare time Squid hacker

I have built 2.2Patch3 on linux 2.2 kernel, with ulimit -SHn 2048, and a
check for poll (similar to your suggestion), and it starts, sees 2048 file
descriptors, and seems to run well. All I need is a stress tester to push
the number of FD's up and see what happens.

Thanks for the reply.
Received on Thu Jun 03 1999 - 23:56:24 MDT

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