Re: [squid-users] RE: Too Many Open File Descriptors

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 11 Aug 2011 00:06:57 +1200

On 10/08/11 21:12, Justin Lawler wrote:
> Thanks again for this.
>
> Yes, just talking internally - squid was recompiled with FD set to 2048.
>
> So to confirm - you think we should update this value to 65535& recompile? Could we get away with a lower value - say 4096?

Why the interest in minimising? the OS ca handle several tens of
millions. And the only overhead in Squid is two arrays of integers until
the FD actually gets used.

>
> If we did this, would we need to use the ulimit in a startup script?

OS default, ulimit run-time update, SELinux run-time limits, and squid
limit, maybe other hidden things as well all affect the value.
  The _minimum_ value of all the above settings is what eventually gets
set (not necessarily used, just _available_ for use).

So if you ulimit the number to 20 it does not matter if you built squid
with 4096 or 16 million. 20 is what Squid gets to use.

Or, as you discovered already, if you built squid with 2048 it does not
matter if you ulimit to 8196. 2048 is what Squid gets to use.

So the answer to your question is to set the Squid one higher than you
expect to need and use one like ulimit which is easily adjusted as your
master (smallest) value.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.14
   Beta testers wanted for 3.2.0.10
Received on Wed Aug 10 2011 - 12:07:02 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 10 2011 - 12:00:01 MDT