Re: [squid-users] Increasing Filedescriptors on Linux - WARNING! Your cache is ruuning out of filedescriptors

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 16 Apr 2004 10:41:19 +0200 (CEST)

On Fri, 16 Apr 2004, Mathew Thomas wrote:

> I read the Henrik document at the web site http://devel.squid-cache.org/hno/linux-lfd.html.
>
> I have got few question about increasing the Filedescriptors: Below the questions are my current (default) values:
>
> 1) Do I need to increase the value in /proc/sys/fs/file-max? Another 50%?

No, you already have plenty.

> 2) How much can I increase the vale for " ulimit -HSn ####" without causing any performance degradation?

Start by using 2048 or 4096. If you still see the problem it is likely
caused by something else and running out of filedescriptors is just a
sideeffect of the real problem.

> 3) Regarding the step "Edit /usr/include/bits/types.h to define __FD_SETSIZE ....". Which value should I put it here -
> the value in "cat /proc/sys/fs/file-max" or the value in " ulimit -HSn ####" ?

You should not need to edit this file any longer.

If you do it needs to be set to the same or higher as your ulimit above.
Make sure both use an even multiple of 64.

> 4) Is the default value below for "/proc/sys/net/ipv4/ip_local_port_range" , the " /proc/sys/kernel/threads-max"
> and " cat /proc/sys/kernel/threads-max" alright or should I increase it?

You are ok with the defaults.

Some machines only have ca 4000 ports in the ip_local_port_range which is
too little.

Regards
Henrik
Received on Fri Apr 16 2004 - 02:41:24 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Apr 30 2004 - 12:00:02 MDT