Hello,

our web proxy for 400 users (actually at the moment less than 100,
but we are going to switch the others to use it soon) is slow.

It is a HP Proliant DL385 running OpenBSD 4.4-stable with
the squid-2.7.STABLE3 from packages (dmesg below).

Does anybody please have a good advice how to find the reason?

A quick big file download test at the other machines (running
CentOS Linux) in the same rack, at the same gigabit switch
shows download speeds (with lynx) which are 10 times better.

The Procurve switch 2848 (J4904A) displays following errors
after I've put the network cable from the OpenBSD machine
to another port on it:

    Excessive jabbering
    Excessive CRC/alignment errors
    Excessive broadcasts

(but I'm not sure if it's a result of me changing the cable)
and the green lamp is always burning (at the other ports
with Linux machines the lamps are blinking).

# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33204
        groups: lo
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:16:35:5b:39:ae
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active
        inet 10.121.42.32 netmask 0xffff0000 broadcast 10.121.255.255
        inet6 fe80::216:35ff:fe5b:39ae%bge0 prefixlen 64 scopeid 0x1
bge1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:16:35:5b:39:ad
        media: Ethernet autoselect (none)
        status: no carrier
enc0: flags=0<> mtu 1536

(i.e. only 1 NIC is connected)

# cat /etc/hostname.bge0
inet 10.121.42.32 255.255.0.0 NONE
! route add -inet 172.25.0.0/16 10.121.42.1

The machine only runs httpd and squid:

# cat /etc/rc.conf.local
rdate_flags="-n ablwdc01"
httpd_flags=YES
amd=NO
lockd=YES
pf=NO
portmap=YES
check_quotas=NO
yppasswdd_flags=NO

# grep -v ^# /etc/squid/squid.conf |grep -v ^$
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 172.25.0.0/16  # RFC1918 possible internal network
acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny all
icp_access allow localnet
icp_access deny all
http_port 3128
http_port 8080
hierarchy_stoplist cgi-bin ?
cache_dir ufs /var/squid/cache 100000 16 256
access_log /var/squid/logs/access.log squid
client_netmask 255.255.255.0
url_rewrite_program /usr/local/sbin/squid_redirect
url_rewrite_children 32
redirector_bypass on
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mgr i...@xxxxxx.com
dns_defnames on
coredump_dir /var/squid/cache

# df -h
Filesystem                             Size    Used   Avail Capacity  Mounted on
/dev/sd0a                              7.9G    2.1G    5.4G    28%    /
/dev/sd0d                              7.9G    494K    7.5G     0%    /var/log
/dev/sd0e                              111G    7.1G   98.3G     7%    /var/squid
ablnas02:/vol/ablhom01/home/afarber    535G    310G    225G    58%
/home/afarber
ablnas02:/vol/ablhom01/home/ldrisis    535G    310G    225G    58%
/home/ldrisis
ablnas02:/vol/ablhom01/home/psauer     535G    310G    225G    58%
/home/psauer

# mount
/dev/sd0a on / type ffs (local, softdep)
/dev/sd0d on /var/log type ffs (local, nodev, nosuid)
/dev/sd0e on /var/squid type ffs (local, nodev, nosuid, softdep)
ablnas02:/vol/ablhom01/home/afarber on /home/afarber type nfs (nodev,
nosuid, v3, udp, timeo=100)

#  top
63 processes:  62 idle, 1 on processor
CPU0 states:  0.9% user,  0.0% nice,  0.3% system,  0.2% interrupt, 98.6% idle
CPU1 states:  0.3% user,  0.0% nice,  0.0% system,  0.0% interrupt, 99.7% idle
Memory: Real: 271M/703M act/tot  Free: 3157M  Swap: 0K/8196M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATE    WAIT      TIME    CPU COMMAND
24833 _squid     2    0   75M   76M sleep/0  poll      0:20  0.24% squid
12497 _squid     2    0 6028K 7688K sleep/0  netio     0:16  0.20% perl
29957 _squid     2    0 6104K 7640K sleep/1  netio     0:02  0.00% perl
17945 _squid     2    0 6132K 7636K sleep/0  netio     0:01  0.00% perl
 2335 _squid     2    0 5940K 7620K idle     netio     0:00  0.00% perl
...........

# vmstat -w 1  (not sure, how to interpret it)
 procs    memory       page                    disks    traps          cpu
 r b w    avm     fre  flt  re  pi  po  fr  sr cd0 sd0  int   sys   cs us sy id
 1 1 0 277300 3230304   55   0   0   0   0   0   0   4  218  1221  172  1  0 99
 0 1 0 277320 3230284   25   0   0   0   0   0   0   0  370  1540  253  0  0 100
 0 1 0 277320 3230284    7   0   0   0   0   0   0   0  273  1399  227  0  0 100
 0 1 0 277320 3230268    7   0   0   0   0   0   0   2  113   491   93  0  0 100
 0 1 0 277324 3230072    9   0   0   0   0   0   0  24  536  2800  385  2  1 97

Switching the url_rewrite_program off (its the AdZap script)
doesn't improve performance.

The daemon class in login.conf:

daemon:\
        :ignorenologin:\
        :datasize=infinity:\
        :maxproc=infinity:\
        :openfiles-cur=256:\
        :stacksize-cur=8M:\
        :localcipher=blowfish,8:\
        :tc=default:

# grep squid /etc/passwd
_squid:*:515:515:Squid Account:/nonexistent:/sbin/nologin

Any advices please?

How could I see if Squid process isn't running out of fd's?

Regards
Alex

--
# dmesg
OpenBSD 4.4-stable (GENERIC.MP) #0: Fri Feb  6 11:06:46 CET 2009
    afar...@ablprx01.xxxxxxxx.com:/sys/arch/i386/compile/GENERIC.MP
cpu0: AMD Opteron(tm) Processor 254 ("AuthenticAMD" 686-class, 1024KB
L2 cache) 2.81 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3
real mem  = 4118343680 (3927MB)
avail mem = 4004368384 (3818MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @
0xf0000, SMBIOS rev. 2.3 @ 0xec000 (64 entries)
bios0: vendor HP version "A05" date 08/22/2005
bios0: HP ProLiant DL385 G1
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC SPCR SRAT
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD erratum 89 present, BIOS upgrade may be required
cpu0: apic clock running at 200MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Opteron(tm) Processor 254 ("AuthenticAMD" 686-class, 1024KB
L2 cache) 2.81 GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3
ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 11, 24 pins
ioapic1 at mainbus0: apid 5 pa 0xfec10000, version 11, 4 pins
ioapic2 at mainbus0: apid 6 pa 0xfec20000, version 11, 4 pins
ioapic3 at mainbus0: apid 7 pa 0xfdc00000, version 11, 4 pins
ioapic4 at mainbus0: apid 8 pa 0xfdc10000, version 11, 4 pins
acpiprt0 at acpi0: bus 1 (PCI0)
acpiprt1 at acpi0: bus 2 (PCI1)
acpiprt2 at acpi0: bus 3 (PCI2)
acpiprt3 at acpi0: bus 0 (CFG0)
acpiprt4 at acpi0: bus 5 (PCI3)
acpiprt5 at acpi0: bus 6 (PCI4)
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
bios0: ROM list: 0xc0000/0x8000 0xc8000/0x4000! 0xcc000/0x1600 0xee000/0x2000
cpu0: Cool'n'Quiet K8 2807 MHz: speeds: 2800 2600 2400 2200 2000 1800 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
ppb0 at pci0 dev 3 function 0 "AMD 8111 PCI-PCI" rev 0x07
pci1 at ppb0 bus 1
ohci0 at pci1 dev 0 function 0 "AMD 8111 USB" rev 0x0b: apic 4 int 19
(irq 5), version 1.0, legacy support
ohci1 at pci1 dev 0 function 1 "AMD 8111 USB" rev 0x0b: apic 4 int 19
(irq 5), version 1.0, legacy support
"Compaq iLO" rev 0x01 at pci1 dev 2 function 0 not configured
"Compaq iLO" rev 0x01 at pci1 dev 2 function 2 not configured
vga1 at pci1 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)
drm at vga1 unsupported
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "AMD OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 "AMD OHCI root hub" rev 1.00/1.00 addr 1
amdpcib0 at pci0 dev 4 function 0 "AMD 8111 LPC" rev 0x05
pciide0 at pci0 dev 4 function 1 "AMD 8111 IDE" rev 0x03: DMA, channel
0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <TEAC, DV-28E-N, C.6B> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
amdpm0 at pci0 dev 4 function 3 "AMD 8111 Power" rev 0x05
ppb1 at pci0 dev 7 function 0 "AMD 8131 PCIX" rev 0x12
pci2 at ppb1 bus 2
ciss0 at pci2 dev 4 function 0 "Compaq Smart Array 64xx" rev 0x01:
apic 5 int 0 (irq 7)
ciss0: 1 LD, HW rev 1, FW 2.58/2.58
scsibus1 at ciss0: 1 targets, initiator 1
sd0 at scsibus1 targ 0 lun 0: <HP, LOGICAL VOLUME, 2.58> SCSI0 0/direct fixed
sd0: 140006MB, 17848 cyl, 255 head, 63 sec, 512 bytes/sec, 286734240 sec total
"AMD 8131 PCIX IOAPIC" rev 0x01 at pci0 dev 7 function 1 not configured
ppb2 at pci0 dev 8 function 0 "AMD 8131 PCIX" rev 0x12
pci3 at ppb2 bus 3
bge0 at pci3 dev 6 function 0 "Broadcom BCM5704C" rev 0x10, BCM5704 B0
(0x2100): apic 6 int 0 (irq 7), address 00:16:35:5b:39:ae
brgphy0 at bge0 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0
bge1 at pci3 dev 6 function 1 "Broadcom BCM5704C" rev 0x10, BCM5704 B0
(0x2100): apic 6 int 1 (irq 10), address 00:16:35:5b:39:ad
brgphy1 at bge1 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0
"AMD 8131 PCIX IOAPIC" rev 0x01 at pci0 dev 8 function 1 not configured
pchb0 at pci0 dev 24 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00
pci4 at pchb0 bus 4
ppb3 at pci4 dev 9 function 0 "AMD 8131 PCIX" rev 0x12
pci5 at ppb3 bus 5
"AMD 8131 PCIX IOAPIC" rev 0x01 at pci4 dev 9 function 1 not configured
ppb4 at pci4 dev 10 function 0 "AMD 8131 PCIX" rev 0x12
pci6 at ppb4 bus 6
"AMD 8131 PCIX IOAPIC" rev 0x01 at pci4 dev 10 function 1 not configured
pchb1 at pci0 dev 24 function 1 "AMD AMD64 0Fh Address Map" rev 0x00
pchb2 at pci0 dev 24 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00
kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00
pchb3 at pci0 dev 25 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00
pchb4 at pci0 dev 25 function 1 "AMD AMD64 0Fh Address Map" rev 0x00
pchb5 at pci0 dev 25 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00
kate1 at pci0 dev 25 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00
isa0 at amdpcib0
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
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 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
mtrr: Pentium Pro MTRR support
softraid0 at root
root on sd0a swap on sd0b dump on sd0b
cpu1: AMD erratum 89 present, BIOS upgrade may be required

# tail /var/log/messages
Feb 27 13:18:12 ablprx01 /bsd: midi0 at pcppi0: <PC speaker>
Feb 27 13:18:12 ablprx01 /bsd: spkr0 at pcppi0
Feb 27 13:18:12 ablprx01 /bsd: npx0 at isa0 port 0xf0/16: reported by
CPUID; using exception 16
Feb 27 13:18:12 ablprx01 /bsd: fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
Feb 27 13:18:12 ablprx01 /bsd: mtrr: Pentium Pro MTRR support
Feb 27 13:18:12 ablprx01 /bsd: softraid0 at root
Feb 27 13:18:12 ablprx01 /bsd: root on sd0a swap on sd0b dump on sd0b
Feb 27 13:18:12 ablprx01 /bsd: cpu1: AMD erratum 89 present, BIOS
upgrade may be required
Feb 27 13:18:54 ablprx01 savecore: no core dump
Feb 27 13:18:54 ablprx01 squid[3808]: Squid Parent: child process 24833 started

Reply via email to