Hi,
I have performance problems on the above platform. After some time the
proxy runs very slowly, and console becomes slow to respond. No
observable difference between bsd.sp or bsd.mp
See tweaks applied below. Since I've tried without them first, but e.g.
squid exhausted filedescriptors, replies with 'don't do that', are not
as useful as 'try this instead' or 'debugging suggestions...' ;-)
Appears to be neither disk I/O or CPU bound, and buffer utilisation
appear normal too.
H/W: HP DL360 G4p with a single fibre NIC (em) in use.
S/W OpenBSD 4.6/i386 bsd.sp from CD, & squid-2.7.STABLE6 from packages.
r...@proxy-s ~>tail /etc/sysctl.conf
...
net.inet.tcp.ecn=1
net.inet.ip.ifq.maxlen=512
net.inet.tcp.ackonpush=1
net.inet.tcp.recvspace=262144
net.inet.tcp.sendspace=262144
net.inet.udp.recvspace=262144
net.inet.udp.sendspace=262144
kern.maxfiles=8192
r...@proxy-s ~>more /etc/login.conf
...
daemon:\
:ignorenologin:\
:datasize=infinity:\
:maxproc=infinity:\
:openfiles=2448:\
:stacksize=8M:\
:localcipher=blowfish,8:\
:tc=default:
...
r...@proxy-s ~>head /etc/squid/squid.conf
...
max_filedescriptors 2048
cache_mem 384 MB
cache_dir ufs /var/squid/cache 12048 16 256
...
r...@proxy-s ~>netstat -m
4172 mbufs in use:
1201 mbufs allocated to data
2966 mbufs allocated to packet headers
5 mbufs allocated to socket names and addresses
915/2266/6144 mbuf 2048 byte clusters in use (current/peak/max)
0/8/6144 mbuf 4096 byte clusters in use (current/peak/max)
0/8/6144 mbuf 8192 byte clusters in use (current/peak/max)
0/8/6144 mbuf 9216 byte clusters in use (current/peak/max)
0/8/6144 mbuf 12288 byte clusters in use (current/peak/max)
0/8/6144 mbuf 16384 byte clusters in use (current/peak/max)
0/8/6144 mbuf 65536 byte clusters in use (current/peak/max)
6208 Kbytes allocated to network (46% in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines
r...@proxy-s ~>top | head
load averages: 1.10, 1.55, 1.66 10:58:24
38 processes: 37 idle, 1 on processor
CPU states: 1.0% user, 0.0% nice, 1.3% system, 1.1% interrupt, 96.6%
idle
Memory: Real: 960M/1214M act/tot Free: 794M Swap: 0K/2052M used/tot
PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
20479 _squid -5 0 950M 949M sleep biowait 20:11 6.30% squid
5193 _squid -6 0 228K 540K sleep piperd 0:12 0.00% unlinkd
11123 _snmpd 2 0 548K 1008K sleep kqread 0:00 0.00% snmpd
276 root 2 0 984K 1728K sleep select 0:00 0.00%
sendmail
r...@proxy-s ~>systat vmstat
1 users Load 1.50 1.88 1.78 Thu Nov 12
10:55:40 2009
memory totals (in KB) PAGING SWAPPING
Interrupts
real virtual free in out in out 2013
total
Active 982620 982620 809216 ops 100
clock
All 1247164 1247164 2910412 pages 1856 em0
57
ciss0
Proc:r d s w Csw Trp Sys Int Sof Flt forks
1 18 1025 5 8876 1913 102 36 fkppw
fksvm
3.4%Int 4.0%Sys 3.0%Usr 0.0%Nic 89.6%Idle pwait
| | | | | | | | | | | relck
||==> rlkok
noram
Namei Sys-cache Proc-cache No-cache 1 ndcpy
Calls hits % hits % miss % fltcp
399 341 85 56 14 2 zfod
cow
Disks sd0 cd0 fd0 17136 fmin
seeks 22848 ftarg
xfers 57 itarg
speed 579K 1 wired
sec 0.3 pdfre
pdscn
pzidle
112 kmapent
r...@proxy-s ~>netstat -iI em0 | egrep "Name|Link"
Name Mtu Network Address Ipkts Ierrs Opkts
Oerrs Colls
em0 1500 <Link> 00:11:0a:57:0f:4c 33078650 0 40412499
0 0
###############################################################################
Squid stats (after 8 hours of traffic) :
Squid Object Cache: Version 2.7.STABLE6
Start Time: Wed, 11 Nov 2009 19:38:48 GMT
Current Time: Thu, 12 Nov 2009 09:45:28 GMT
Connection information for squid:
Number of clients accessing cache: 495
Number of HTTP requests received: 1629442
Number of ICP messages received: 0
Number of ICP messages sent: 0
Number of queued ICP replies: 0
Request failure ratio: 0.01
Average HTTP requests per minute since start: 1924.5
Average ICP messages per minute since start: 0.0
Select loop called: 19352623 times, 2.625 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 28.3%, 60min: 31.1%
Byte Hit Ratios: 5min: 10.1%, 60min: 14.9%
Request Memory Hit Ratios: 5min: 19.4%, 60min: 21.7%
Request Disk Hit Ratios: 5min: 21.3%, 60min: 26.4%
Storage Swap size: 5626248 KB
Storage Mem size: 390016 KB
Mean Object Size: 18.42 KB
Requests given to unlinkd: 97569
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.03066 0.03066
Cache Misses: 0.04519 0.05633
Cache Hits: 0.00000 0.00091
Near Hits: 0.07014 0.07014
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.00949 0.00949
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 50800.444 seconds
CPU Time: 1112.260 seconds
CPU Usage: 2.19%
CPU Usage, 5 minute avg: 7.08%
CPU Usage, 60 minute avg: 6.86%
Process Data Segment Size via sbrk(): 0 KB
Maximum Resident Size: 0 KB
Page faults with physical i/o: 118
Memory accounted for:
Total accounted: 498095 KB
memPoolAlloc calls: 160276554
memPoolFree calls: 157309752
File descriptor usage for squid:
Maximum number of file descriptors: 2048
Largest file desc currently in use: 1640
Number of file desc currently in use: 1324
Files queued for open: 0
Available number of file descriptors: 724
Reserved number of file descriptors: 100
Store Disk files open: 2
IO loop method: kqueue
Internal Data Structures:
307086 StoreEntries
82257 StoreEntries with MemObjects
82120 Hot Object Cache Items
305422 on-disk objects
###############################################################################
r...@proxy-s ~>bioctl -vh sd0
Volume Status Size Device
ciss0 0 Online 67.8G sd0 RAID1
0 Online 67.8G 0:0.0 noencl <COMPAQ BD07288277 >
'3KT2AZ6R00007607CEBF'
1 Online 67.8G 0:1.0 noencl <COMPAQ BD07288277 >
'3KT2AHSP00007608J847'
r...@proxy-s ~>sysctl hw
hw.machine=i386
hw.model=Intel(R) Xeon(TM) CPU 3.40GHz ("GenuineIntel" 686-class)
hw.ncpu=1
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0,cd0,fd0
hw.diskcount=3
hw.sensors.acpitz0.temp0=8.30 degC (zone temperature)
hw.sensors.ciss0.drive0=online (sd0), OK
hw.cpuspeed=3401
hw.setperf=100
hw.vendor=HP
hw.product=ProLiant DL360 G4p
hw.serialno=GBJ540007V
hw.uuid=33383030-3739-4742-4a35-343030303756
hw.physmem=2147000320
hw.usermem=2146988032
hw.ncpufound=2
r...@proxy-s ~>df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/sd0a 1009M 49.5M 909M 5% /
/dev/sd0e 19.7G 16.0K 18.7G 0% /home
/dev/sd0d 19.7G 592M 18.1G 3% /usr
/dev/sd0f 19.7G 6.4G 12.3G 34% /var
r...@proxy-s ~>cat /var/run/dmesg.boot
OpenBSD 4.6 (GENERIC) #58: Thu Jul 9 21:24:42 MDT 2009
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 3.40GHz ("GenuineIntel" 686-class) 3.41 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,CNXT-ID,CX16,xTPR
real mem = 2147000320 (2047MB)
avail mem = 2067263488 (1971MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @ 0xf0000,
SMBIOS rev. 2.3 @ 0xec000 (72 entries)
bios0: vendor HP version "P54" date 08/16/2005
bios0: HP ProLiant DL360 G4p
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP SPCR MCFG APIC SSDT
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 200MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec00000, version 20, 24 pins
ioapic1 at mainbus0: apid 9 pa 0xfec10000, version 20, 24 pins
ioapic1: misconfigured as apic 0, remapped to apid 9
ioapic2 at mainbus0: apid 10 pa 0xfec82000, version 20, 24 pins
ioapic3 at mainbus0: apid 11 pa 0xfec82400, version 20, 24 pins
acpiprt0 at acpi0: bus 1 (IP2P)
acpiprt1 at acpi0: bus 2 (ICHR)
acpiprt2 at acpi0: bus 7 (PCXA)
acpiprt3 at acpi0: bus 10 (PCXB)
acpiprt4 at acpi0: bus 6 (PTB0)
acpiprt5 at acpi0: bus 13 (PTA0)
acpiprt6 at acpi0: bus 3 (PTC0)
acpiprt7 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: FVS, 3400, 2800 MHz
acpitz0 at acpi0: critical temperature 31 degC
bios0: ROM list: 0xc0000/0x8000 0xc8000/0x4000! 0xcc000/0x1800
0xee000/0x2000!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
bridge io address conflict 0x1000/0x3000
pchb0 at pci0 dev 0 function 0 "Intel E7520 Host" rev 0x0c
ppb0 at pci0 dev 2 function 0 "Intel E7520 PCIE" rev 0x0c
pci1 at ppb0 bus 13
ppb1 at pci0 dev 4 function 0 "Intel E7520 PCIE" rev 0x0c
pci2 at ppb1 bus 6
ppb2 at pci2 dev 0 function 0 "Intel PCIE-PCIE" rev 0x09
pci3 at ppb2 bus 7
em0 at pci3 dev 1 function 0 "Intel PRO/1000MF (82546EB)" rev 0x01: apic
10 int 0 (irq 5), address 00:11:0a:57:0f:4c
em1 at pci3 dev 1 function 1 "Intel PRO/1000MF (82546EB)" rev 0x01: apic
10 int 1 (irq 5), address 00:11:0a:57:0f:4d
ppb3 at pci2 dev 0 function 2 "Intel PCIE-PCIE" rev 0x09
pci4 at ppb3 bus 10
ppb4 at pci0 dev 6 function 0 "Intel E7520 PCIE" rev 0x0c
pci5 at ppb4 bus 3
ppb5 at pci0 dev 28 function 0 "Intel 6300ESB PCIX" rev 0x02
pci6 at ppb5 bus 2
ciss0 at pci6 dev 1 function 0 "Compaq Smart Array 64xx" rev 0x01: apic
9 int 0 (irq 5)
ciss0: 1 LD, HW rev 1, FW 2.36/2.36, 64bit fifo
scsibus0 at ciss0: 1 targets
sd0 at scsibus0 targ 0 lun 0: <HP, LOGICAL VOLUME, 2.36> SCSI0 0/direct
fixed
sd0: 69459MB, 512 bytes/sec, 142253280 sec total
bge0 at pci6 dev 2 function 0 "Broadcom BCM5704C" rev 0x10, BCM5704 B0
(0x2100): apic 9 int 1 (irq 5), address 00:15:60:0b:ae:34
brgphy0 at bge0 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0
bge1 at pci6 dev 2 function 1 "Broadcom BCM5704C" rev 0x10, BCM5704 B0
(0x2100): apic 9 int 2 (irq 5), address 00:15:60:0b:ae:33
brgphy1 at bge1 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0
uhci0 at pci0 dev 29 function 0 "Intel 6300ESB USB" rev 0x02: apic 8 int
16 (irq 5)
uhci1 at pci0 dev 29 function 1 "Intel 6300ESB USB" rev 0x02: apic 8 int
19 (irq 5)
"Intel 6300ESB WDT" rev 0x02 at pci0 dev 29 function 4 not configured
"Intel 6300ESB APIC" rev 0x02 at pci0 dev 29 function 5 not configured
ehci0 at pci0 dev 29 function 7 "Intel 6300ESB USB" rev 0x02: apic 8 int
23 (irq 5)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb6 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0x0a
pci7 at ppb6 bus 1
vga1 at pci7 dev 3 function 0 "ATI Rage XL" rev 0x27
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
"Compaq iLO" rev 0x01 at pci7 dev 4 function 0 not configured
"Compaq iLO" rev 0x01 at pci7 dev 4 function 2 not configured
ichpcib0 at pci0 dev 31 function 0 "Intel 6300ESB LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 6300ESB IDE" rev 0x02: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <HL-DT-ST, CD-ROM GCR-8240N, 2.03> ATAPI
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2
pciide0: channel 1 disabled (no drives)
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
com1: probed fifo depth: 0 bytes
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
mtrr: Pentium Pro MTRR support
softraid0 at root
root on sd0a swap on sd0b dump on sd0b
thanks for any suggestions.
/Pete