[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: file descriptors??



In article <[🔎] Pine.LNX.3.96.980107103756.5460C-100000@siva.taz.net.au>,
Craig Sanders <cas@taz.net.au> wrote:
>i've tried applying the "gt256 fd patch" but that causes some NFS
>problems (i use nfs to mount my debian mirror for upgrades) which would
>probably go away if netstd and netbase were recompiled with the new fd
>limit.

What I do is something different. I put this in /etc/initscript:

# Set # of fd's to 256 for all processes.
ulimit -S -n 256

That sets the soft limit for all processes to 256 fds. It can be raised
by an individual process if needed. My /etc/init.d/squid script contains:

MAXFD=`ulimit -H -n`
if [ "$MAXFD" -gt 1024 ]
then
        MAXFD=1024
fi
ulimit -n $MAXFD

So this way, the number of file descriptors for squid is 1024 max, but
for all other proceses it's limited to 256.

>btw, as background info for this, i'm building a squid box with dual
>ppro 200 cpus, 512mb memory, 40GB disk (32gb cache, 8gb system, logging,
>etc and hot-swap root fs).

That's a nice box. But don't expect any extra performance because it's
a SMP machine - squid is one monolithic process and will not benefit from
a second processor.

32 GB cache and 512MB of mem sounds about right for squid, you could do
with 256 or 384 MB if you'd run squid-novm (but squid-novm uses a lot
more file descriptors).

>this box is to be installed remotely - several
>thousand kilometres away. it's being built with the latest unstable now
>because i don't want to have to do a libc5 to libc6 upgrade remotely
>when hamm gets released...and debian's upgradability (for bug fixes and
>security fixes) is absolutely vital for a remote server like this, imo.

Don't worry - we have exactly the same setup (only 9GB of cache tho')
and it hasn't crashed ever. Except for the libc6 problems, but these
are now solved. I sacrificed myself as guinea pig when the box was
still installed here locally, and I think all bugs are gone now.

Mike.
-- 
 Miquel van Smoorenburg |  The dyslexic, agnostic, insomniac lay in his bed
    miquels@cistron.nl  |  awake all night wondering if there is a doG


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: