Niels Pollem wrote on 16 Sep 1999 16:19:40 +0200 :
> "Martin Och" <martin@och.cz> writes:
>
> > In higer load aprox. 18.4k requests perhour squid starts write to cache
> > log:
> > Reserved FD adjusted from 100 to 917 due to failures
> > Your cache running out of filedescriptors
> > Your cache running out of filedescriptors
> > and so on....
> >
> > Please, what is BAD?
>
> http://squid.nlanr.net/Doc/FAQ/FAQ-11.html#ss11.4
>
> http://hem.passagen.se/hno/squid/#notes
That's not a real solution. When you increase the max. FDs from 1024
to, say, 4096, you may still be getting messages like
Reserved FD adjusted from 100 to 3976 due to failures
The problem is that Squid reserves itself FDs after a failure of
some kind (I didn't dig that deep in the source...), and does so
too aggressively.
To reduce the aggressiveness, you can apply the following small patch
to src/fd.c. This will not solve the real problem (the failures), but
it will keep your Squid running.
The usual caveats apply. It works for me, YMMV.
Regards,
-Thorsten
*** fd.c Wed Jul 21 14:42:13 1999
--- fd.c.orig Wed Jul 21 14:43:16 1999
***************
*** 191,197 ****
/*
* Calculate a new reserve, based on current usage and a small extra
*/
! new = RESERVED_FD + XMIN(25, Squid_MaxFD / 16);
if (new <= RESERVED_FD)
return;
x = Squid_MaxFD - 20 - XMIN(25, Squid_MaxFD / 16);
--- 191,197 ----
/*
* Calculate a new reserve, based on current usage and a small extra
*/
! new = Squid_MaxFD - Number_FD + XMIN(25, Squid_MaxFD / 16);
if (new <= RESERVED_FD)
return;
x = Squid_MaxFD - 20 - XMIN(25, Squid_MaxFD / 16);
> Niels
>
> --
> Niels Pollem, np@tzi.de
>
>
---------------------------------------------------------------------
Thorsten Biel (ITadmin GmbH & Ofix GmbH) Thorsten.Biel@alcatel.de
Alcatel SEL AG, ZIT/SS5, Lorenzstr. 10, 70435 Stuttgart, Germany
Tel (+49 711) 821-45657, Fax (+49 711) 821-44994, PGP on request
Received on Thu Sep 16 1999 - 10:01:24 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:26 MST