Subject: A clew to low NFS performance
To: None <current-users@netbsd.org, tech-kern@netbsd.org>
From: John Franklin <franklin@elfie.org>
List: current-users
Date: 08/04/2002 02:37:27
On my NFS server, I recently updated to 1.6 BETA5. Now my NFS
performance feels like the Dow. Apps hang when they need to access
files (like Mozilla writing to cache or seti updating the state.sah.)
While poking around on the NFS server, I discovered this:
File System Bufs used % kB in use % Bufsize kB % Util %
/ 702 56 2688 53 3664 73 73
/usr/src 174 13 178 3 696 13 25
/home 78 6 624 12 624 12 100
This comes from systat bufcache. Why does / have so many of the
metadata buffers? /home was the one being pounded. /var has none, /usr
has none. / is doing nothing, but has 73%. Also, wd1 (the nfs exported
drive) is at 100+% busy (according to systat vmstat) while doing a tar
extract op.
Rebooting both machines, logging in and doing a simple ls -CFR on the
NFS mounted /usr/src the Bufsize kB for / is 75% with /usr/src claiming
the balance. It's not /var or /usr. They have their own partitions.
/tmp is an MFS mount.
Is this right? If it is, no wonder I can't get any performance. / is
hogging all the metadata buffers. Top doesn't show anything out of the
ordinary.
Hard vs soft NFS mounts: no difference. Softdeps vs no: no difference.
Default rwsize vs 32k rwsize: no difference.
Any ideas?
Server's mount table:
[1]% mount
/dev/wd0a on / type ffs (noatime, local)
/dev/wd0e on /var type ffs (noatime, soft dependencies, local)
/dev/wd0f on /usr type ffs (noatime, soft dependencies, local)
mfs:145 on /tmp type mfs (local)
/dev/wd1f on /usr/src type ffs (noatime, NFS exported, local)
/dev/wd1g on /home type ffs (noatime, NFS exported, local)
kernfs on /kern type kernfs (local)
procfs on /proc type procfs (local)
Server's dmesg:
NetBSD 1.6_BETA5 (BROADWAY) #0: Fri Aug 2 00:38:36 EDT 2002
franklin@deathmitten:/usr/src/16b/usr/src/sys/arch/i386/compile/BROADWAY
cpu0: Intel Pentium (P54C) (586-class), 99.96 MHz
cpu0: features 1bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
total memory = 97916 KB
avail memory = 88240 KB
using 1249 buffers containing 4996 KB of memory
BIOS32 rev. 0 found at 0xf0480
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82439HX System Controller (TXC) (rev. 0x03)
pcib0 at pci0 dev 7 function 0
pcib0: Intel 82371SB PCI-to-ISA Bridge (PIIX3) (rev. 0x01)
pciide0 at pci0 dev 7 function 1: Intel 82371SB IDE Interface (PIIX3) (rev. 0x00)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <ST3660A>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 520 MB, 1057 cyl, 16 head, 63 sec, 512 bytes/sect x 1065456 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 3, DMA mode 1
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 0, DMA mode 1 (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
wd1 at pciide0 channel 1 drive 0: <ST380020A>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 76319 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
pciide0: secondary channel interrupting at irq 15
wd1(pciide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
uhci0 at pci0 dev 7 function 2: Intel 82371SB USB Host Controller (PIIX3) (rev. 0x01)
uhci0: interrupting at irq 12
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
vga0 at pci0 dev 9 function 0: Tseng Labs ET4000w32p rev C (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
fxp0 at pci0 dev 10 function 0: i82559 Ethernet, rev 8
fxp0: interrupting at irq 10
fxp0: Ethernet address 00:d0:b7:47:96:78
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp0 at pci0 dev 11 function 0: Lite-On 82C169 Ethernet, pass 2.0
tlp0: interrupting at irq 11
tlp0: Ethernet address 00:a0:cc:28:2e:3d
ukphy0 at tlp0 phy 1: Generic IEEE 802.3u media interface
ukphy0: MTD972 10/100 media interface (OUI 0x00032d, model 0x0000), rev. 8
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
biomask f365 netmask ff65 ttymask ffe7
IPsec: Initialized Security Association Processing.
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
IP Filter: v3.4.27 initialized. Default = pass all, Logging = disabled
jf
--
John Franklin
franklin@elfie.org
ICBM: 35°43'56"N 78°53'27"W