Re: [squid-users] linux-2.4 and file descriptors

From: Florin Andrei <florin@dont-contact.us>
Date: 30 Jul 2001 16:48:40 -0700

On 30 Jul 2001 18:56:56 -0400, Brian wrote:
>
> 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.

I've found the same variable also in
/usr/src/linux/include/linux/posix_types.h (that's somewhere in the
kernel tree).
Which one is "better"? :-)

> * 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).

I actually set it with "ulimit -HSn 8192". This will be a busy proxy.

> 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.

Actually, on my system (RH 7.1 running kernel-2.4.7) this limit already
is 8192, i didn't touched it, nor the system did (i think).

> 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.

So, because i ran ./configure with "ulimit -HSn 8192", and my system
already has file-max = 8192, i think i should increase file-max to
something like 9126, right?

> * Change your per-process limits.
> Just like when you compiled it.

That means to run ulimit somewhere in the startup script, right before
launching Squid, right?

--
Florin Andrei
Received on Mon Jul 30 2001 - 17:48:52 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:20 MST