On Monday 30 July 2001 06:23 pm, Florin Andrei wrote:
> There are many documents describing how to modify the number of file
> descriptors on linux-2.2 for Squid. But there is no such document
> (AFAIK) doing the same thing for linux-2.4
> Anyone knows a good tutorial on linux-2.4, Squid and file descriptors?
I haven't seen one, but the process is not as bad as it was for 2.2.
There are three places where you need to change the FD limits.
Before you run ./configure on squid...
* Change FD_SETSIZE in your includes.
On Debian, you can find __FD_SETSIZE in /usr/include/bits/types.h . YMMV
on Redhat and others, but a grep through /usr/include should track it down
in short order.
* Change your per-process limits.
In bash (the default shell in most dists), you can use 'ulimit -n' to see
the current value and 'ulimit -n 4096' to set it to 4096 (or whatever you
need).
Before you run your new squid binary...
* Change the system-wide FD limit.
Run 'echo 8192 > /proc/sys/fs/file-max' to change the limit to 8192.
This number should be higher than the number of FDs you give squid by at
least a couple thousand. Other programs need FDs, too, you know.
* Change your per-process limits.
Just like when you compiled it.
Note that all of these actions must be done by root, but the limits will
remain if you su from root, so you can still configure, compile, and run
squid as a normal user.
-- Brian
Received on Mon Jul 30 2001 - 16:56:56 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:20 MST