Re: [squid-users] Increasing Filedescriptors on Linux - WARNING!
On Fri, 16 Apr 2004, Mathew Thomas wrote:
> I read the Henrik document at the web site [url]http://devel.squid-cache.org/hno/linux-lfd.html[/url].
> 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%?[/color]
No, you already have plenty.
> 2) How much can I increase the vale for " ulimit -HSn ####" without causing any performance degradation?[/color]
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 ####" ?[/color]
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?[/color]
You are ok with the defaults.
Some machines only have ca 4000 ports in the ip_local_port_range which is