Re: [squid-users] Filedescriptors

From: Colin Campbell <sgcccdc@dont-contact.us>
Date: Wed, 11 Sep 2002 14:10:32 +1000 (EST)

Hi,

I've a couple of versions of FreeBSd (3.2, 4.2, 4.5) running a couple of
versions of squid (2.2S5, 2.4S6, 2.5-DEVEL). The configure script works
out what the maximum number of filedescriptors is available (search for
MAXFD in configure) and uses that. Seems to coincide with whatever "ulimit
-n" shows and this can be different to what kern.maxfiles is.

On Tue, 10 Sep 2002, Joe Cooper wrote:

> Comments inline:
>
> Dave Raven wrote:
> > Thanks for the reply, but I have a few responses. (Only to the FreeBSD side
> > of the FAQ)
> >
> > kern.maxfiles=65536
> > kern.maxfilesperproc=32768
> > [root@storm] /mnt/cache # sysctl -a kern.maxfiles && sysctl -a
> > kern.maxfilesperproc
> > kern.maxfiles: 65536
> > kern.maxfilesperproc: 32768
> > [root@opteq] /mnt/cache # pstat -T
> > 84/65536 files
> >
> > We can see there are definately 65536 files available...
> > (note the cache was not running hence the 84)
> >
> > the maximum setting advisable is probably about that without causing
> > yourself too much
> > trouble. However, that is what my freebsd box is set to, and squid is still
> > only using
> > 4780 file descriptors.
>
> Squid picks up the file descriptors at build time. Whatever they are at
> build time is what you get from the binary forevermore. I'm not sure
> about FreeBSD, but in Linux one must alter it in the shell doing the
> building as well as at the OS level:
>
> # ulimit -HSn 8192
>
> For example. I am not familiar enough with FreeBSD to make any concrete
> suggestions. There are many FreeBSD users here, though, and I reckon
> they'll speak up if they know how to improve upon things.

Colin
Received on Tue Sep 10 2002 - 22:11:05 MDT

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