Re: New Squid Box/FreeBSD tuning

From: Arjan de Vet <Arjan.deVet@dont-contact.us>
Date: Wed, 7 Apr 1999 22:20:59 +0200 (CEST)

In article <015401be7f81$9eb7b1a0$3102fbd1@jason.siscom.net> you write:

>I'm looking for configuration recommendations. We are building a new squid
>box with the following hardware:
>
>Hardware:
>pII/350
>512M SDRAM - ECC
>2gig for boot/system
>5 x 9gig SCSI for cache
>
>Software:
>FreeBSD 3.1S
>Squid 2.1.PATCH2 + mem leak patches + SkyCache Patches
>
>My question is, besides adjusting MAXUSERS in the kernel (any
>recommendations on a number?) what else should I adjust in FreeBSD?

I'm currently preparing a similar box with FreeBSD 3.1-stable but then
on a machine with 640MB RAM and an old Squid 1.1.20 with my NEW_STORE
patch using 64 * 64 directories with 384 entries/directory maximum to
keep the directories < 8KB.

I currently use in the kernel configuration (still experimenting):

    maxusers 128

    # soft updates
    options SOFTUPDATES

    # increase the buffer cache for caching all metadata (directories)
    # which is 64 * 64 = 4096 * 8KB = 32 MB in size; this will improve
    # the performance of open() calls dramatically (no physical I/O
    # needed anymore); 20480 may be a little bit high...
    options "NBUF=20480"

    # more network buffers
    options "NMBCLUSTERS=8192"

In /etc/rc.local:

    tmp=`sysctl -n vfs.maxvmiobufspace`
    sysctl -w vfs.maxvmiobufspace=`expr $tmp / 4`

This will prefer metadata in favor of file data in the buffer cache.

NOTE: for the above NBUF/NMBCLUSTERS settings you'll need some extra
patching, see the thread "Increasing both NBUF and NMBCLUSTERS leads to
panics" on the freebsd-hackers mailing list:

  http://www.freebsd.org/cgi/getmsg.cgi?fetch=1068731+0+current/freebsd-hackers

Arjan
Received on Wed Apr 07 1999 - 14:19:37 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:45:45 MST