Re: [squid-users] running out of file descriptors

From: Mike Rambo <mrambo@dont-contact.us>
Date: Wed, 02 Apr 2003 16:05:33 -0500

Thanks for the help. I'll answer your questions inline below.

Henrik Nordstrom wrote:
>
> Mike Rambo wrote:
> >
> > We're running squid-2.4.STABLE7-2mdk on Mandrake Linux release 9.0
> > (dolphin) for i586. It's been running ok for a few weeks. I noticed this
> > morning numerous "WARNING! Your cache is running out of filedescriptors"
> > errors in cache.log.
>
> In most cases this is actually a sign of other problems hogging down
> Squid, causing connections to pile up.
>
> Begin by a health check of your system:
>
> a) Is it swapping?

Yes, a little anyway. Since we rebooted yesterday is is about 5MB into
swap. Prior to the reboot it had reached almost 100MB swap after
approximately 30 days or so uptime. The machine has either 1GB or 1.5GB
ram installed but I noticed messages in the log that only 896MB would be
used without a highmem kernel so more wouldn't do me any good anyway
with the current kernel.

>
> b) What cache_dir type are you using? If using ufs, consider swiching
> to aufs or diskd

cache_dir diskd /mnt/cache 11000 16 256

I've also increased cache_mem to 128MB, turned on buffered logs, and
turned off the store.log to try to minimize unnecessary disk access. We
have 15 redirectors running to squidGuard although after looking at the
redirector stats I may reduce those to 10.

>
> c) How many requests/second are Squid processing during peak hours?
>

Cache Utilisation:

Last hour:
sample_start_time = 1049310208.31383 (Wed, 02 Apr 2003 19:03:28 GMT)
sample_end_time = 1049313808.301256 (Wed, 02 Apr 2003 20:03:28 GMT)
client_http.requests = 69.485624/sec
client_http.hits = 30.510768/sec
client_http.errors = 0.000000/sec
client_http.kbytes_in = 35.227637/sec
client_http.kbytes_out = 387.897866/sec

This snapshot has been taken somewhat after our peak is usually reached
although as I recall the stat for the last 8 hours was not significantly
different.

>
> Squid-2.5.STABLE can be compiled with support for many filedescriptors
> without modifying the Linux header files with most currently used GNU
> libc versions.
>
> Note of warning to Linux users: The Linux GNU libc headers assumes the
> maximum number of filedescriptors is an multiple of 32. Make sure this
> is the case when you build Squid with more than the default 1024
> filedescriptors or odd effects may be seen under load.. (all Squid
> versions).

This is certainly something to file away. Thanks. One other piece of
info I noted is this:

File descriptor usage for squid:
        Maximum number of file descriptors: 1024
        Largest file desc currently in use: 930
        Number of file desc currently in use: 637
        Files queued for open: 0
        Available number of file descriptors: 387
        Reserved number of file descriptors: 100
        Store Disk files open: 0

Seems like I am running out of descriptors just as the log says. What
other things can I look at to see why?

>
> Regards
> Henrik

-- 
Mike Rambo
mrambo@lsd.k12.mi.us
Received on Wed Apr 02 2003 - 14:05:45 MST

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