Re: [squid-users] squid with FreeBSD 6.0 tuning

From: Wojciech Puchar <wojtek@dont-contact.us>
Date: Mon, 27 Nov 2006 08:20:12 +0100 (CET)

>>
>> 2/3 of time is system time. is it OK? can squid be made faster. it's using
>> diskd, disks are much less loaded than CPU
>
> Which version of Squid are you using? Whats the request rate at the time
> Squid is using that much CPU? Whats the hardware spec?

FreeBSD 6.2, pentium 4 2GB RAM (but RAM is more than enough), 2 squid
disks, 3 directories.

request rate - will have to check when traffic is highest (somewhat like
50-100), 850 people network,

Squid Cache: Version 2.5.STABLE14
configure options: --bindir=/usr/local/sbin
--sysconfdir=/usr/local/etc/squid --datadir=/usr/local/etc/squid
--libexecdir=/usr/local/libexec/squid --localstatedir=/usr/local/squid
'--enable-removal-policies=lru heap' '--enable-auth=basic ntlm digest'
'--enable-basic-auth-helpers=NCSA PAM MSNT SMB winbind YP'
--enable-digest-auth-helpers=password
'--enable-external-acl-helpers=ip_user unix_group wbinfo_group
winbind_group' '--enable-ntlm-auth-helpers=SMB winbind'
'--enable-storeio=ufs diskd null' --enable-delay-pools --enable-snmp
--enable-underscores --enable-useragent-log --with-large-files
--enable-large-cache-files '--enable-err-languages=Azerbaijani Bulgarian
Catalan Czech Danish Dutch English Estonian Finnish French German
Greek Hebrew Hungarian Italian Japanese Korean Lithuanian Polish
Portuguese Romanian Russian-1251 Russian-koi8-r Serbian
Simplify_Chinese Slovak Spanish Swedish Traditional_Chinese Turkish'
--enable-default-err-language=English --enable-dlmalloc
--prefix=/usr/local i386-portbld-freebsd6.2

machine config:

Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.2-RC1 #2: Sun Nov 26 20:47:19 CET 2006
wroot@w3cache.interecho.com:/usr/src/sys/i386/compile/*****************
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 3.20GHz (3192.01-MHz 686-class CPU)
   Origin = "GenuineIntel" Id = 0xf34 Stepping = 4
   Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
   Features2=0x441d<SSE3,RSVD2,MON,DS_CPL,CNTX-ID,<b14>>
   Logical CPUs per core: 2
real memory = 2145579008 (2046 MB)
avail memory = 2092003328 (1995 MB)
acpi0: <INTEL D865GBF> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <display, VGA> at device 2.0 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci1: <ACPI PCI bus> on pcib1
fxp0: <Intel 82551 Pro/100 Ethernet> port 0xcc00-0xcc3f mem 0xff8ff000-0xff8fffff,0xff8c0000-0xff8dffff irq 5 at device 1.0 on pci1
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus0
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:07:e9:0a:04:1a
fxp1: <Intel 82559 Pro/100 Ethernet> port 0xc800-0xc83f mem 0xff8fe000-0xff8fefff,0xff700000-0xff7fffff irq 3 at device 3.0 on pci1
miibus1: <MII bus> on fxp1
inphy1: <i82555 10/100 media interface> on miibus1
inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1: Ethernet address: 00:02:b3:26:34:99
fxp2: <Intel 82562ET (ICH5/ICH5R) Pro/100 VE Ethernet> port 0xc400-0xc43f mem 0xff8fd000-0xff8fdfff irq 7 at device 8.0 on pci1
miibus2: <MII bus> on fxp2
inphy2: <i82562ET 10/100 media interface> on miibus2
inphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp2: Ethernet address: 00:00:11:7f:ad:3f
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH5 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
atapci1: <Intel ICH5 SATA150 controller> port 0xe800-0xe807,0xe400-0xe403,0xe000-0xe007,0xdc00-0xdc03,0xd800-0xd80f irq 10 at device 31.2 on pci0
ata2: <ATA channel 0> on atapci1
ata3: <ATA channel 1> on atapci1
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
acpi_button0: <Sleep Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
atkbd0: [GIANT-LOCKED]
orm0: <ISA Option ROMs> at iomem 0xca800-0xcbfff,0xcc000-0xccfff,0xcd000-0xcdfff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 3192010856 Hz quality 800
Timecounters tick every 1.000 msec
ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding enabled, default to accept, logging limited to 25 packets/entry by default
ad0: 38204MB <SAMSUNG SP0411N TW100-08> at ata0-master UDMA100
ad2: 190782MB <WDC WD2000JB-00GVA0 08.02D08> at ata1-master UDMA100
ad6: 157066MB <WDC WD1600YS-01SHB0 20.06C03> at ata3-master SATA150
Trying to mount root from ufs:ad0a

SMP turned off, most FreeBSD users advice Hyperthreading works best
when... unused but i can try SMP.

squid config (other things removed, most important things only, acl's not
very complicated) below:

max_open_disk_fds 0
cache_swap_low 98
cache_swap_high 100
cache_mem 64 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 10000000 KB
shutdown_lifetime 15 seconds
client_lifetime 2 hour

cache_dir diskd /squid/ad6a 50000 128 256 max-size=65536
cache_dir diskd /squid/ad6e 90000 16 256
cache_dir diskd /squid/ad2 180000 16 256

disk load are like 20%, CPU like 50% under highest load, system disk are
separate.
Received on Mon Nov 27 2006 - 00:33:41 MST

This archive was generated by hypermail pre-2.1.9 : Fri Dec 01 2006 - 12:00:03 MST