Re: MAXFD frustrations

From: Joe Cooper <joe@dont-contact.us>
Date: Mon, 03 Dec 2001 12:33:14 -0600

I don't see how it could still be necessary--no kernel recompile is
needed to use more than 1024, just just change the bits/types.h file to
FD_SETSIZE 8192.

Unless Henrik has some knowledge I don't have on this (he knows Linux
kernel dealings better than I), I'd say change it as long as poll is
being used. And poll should be used by default on Linux if it isn't
already, of course.

Duane Wessels wrote:

> I'm running some tests on a linux box and had some trouble getting
> squid to use more than 1024 descriptors. In src/squid.h we have:
>
> /* Cannot increase FD_SETSIZE on Linux */
> #if defined(_SQUID_LINUX_)
> #undef CHANGE_FD_SETSIZE
> #define CHANGE_FD_SETSIZE 0
> #endif
>
> Is this still true for modern Linux versions?
>
>
> Also in src/main.c we have:
>
> if (FD_SETSIZE < Squid_MaxFD)
> Squid_MaxFD = FD_SETSIZE;
>
> Seems to me that we can relax these restrictions if Squid uses
> poll() instead of select(), no? Way back when, the whole
> reason for all these checks were to make sure that Squid didn't
> exceed some array bounds in select code. I don't think poll
> has that problem though...

-- 
Joe Cooper <joe@swelltech.com>
http://www.swelltech.com
Web Caching Appliances and Support
Received on Mon Dec 03 2001 - 11:30:47 MST

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