...making Linux just a little more fun!
By Jim Dennis, Jason Creighton, Chris G, Karl-Heinz, and... (meet the Gang) ... the Editors of Linux Gazette... and You!
From Justin Piszcz
Answered By: Thomas Adam
I have a Debian Etch (testing) machine running 2.6.11.11.
Using FTP, I can easily achieve 10MB/s+ (megabytes per second) to or from the box. The main HDD in the box is a 400GB, 7200RPM, ATA/100 HDD attached to an ATA/133 Promise Controller.
I believe the problem began when I upgraded the box to 2.6.11.
Problem Description:
Sending files to the box via NFS is slow, 1MB/s for a few seconds, nothing, then 2-3MB/s then back to nothing.
Receiving or (pulling) files from the box achieves a sustained transfer rate of 10MB/s+ (megabytes per second).
Boxname = p4box.
p4box (share = /home/myfiles)
If I mount p4box onto another box:
# mount p4box:/home/myfiles /mnt # cp 1gbfile.txt /mnt
The above process will take forever, stall, lag and etc.
If I mount p4box onto another box:
# mount p4box:/home/myfiles /mnt # cp /mnt/1gbfile.txt .
I get normal NFS speeds on a 100mbps network.
The problem also occurs in the following scenario:
On p4box (box with the problem):
I:
# mount remote_machine:/disk2 /mnt # cp /mnt/1gig.txt .
This also does average 1MB/s, but not consistent, it peaks and goes slower and then nothing at all for a while.
If I do the same and copy something to the NFS share (outbound) then it runs at 10MB/s (megabytes per second).
The issue is inbound NFS is VERY slow.
On the affected box:
# Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 1283895 0 0 0 636062 0 0 0 BMRU lo 16436 0 1040 0 0 0 1040 0 0 0 LRU
There is clearly no network issue.
REMEMBER: FTP works at full speed in both directions.
# rpcinfo -p l1 program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100021 1 udp 32768 nlockmgr 100021 3 udp 32768 nlockmgr 100021 4 udp 32768 nlockmgr 100024 1 udp 831 status 100024 1 tcp 834 status 100003 2 udp 2049 nfs 100003 3 udp 2049 nfs 100005 1 udp 996 mountd 100005 1 tcp 999 mountd 100005 2 udp 996 mountd 100005 2 tcp 999 mountd 100005 3 udp 996 mountd 100005 3 tcp 999 mountd
I've tried rebooting the box, disconnecting/remounting/etc, nothing seems to solve this issue.
I've searched Google and the Web but I have not found anything pertinent to this situation.
Does anyone have any idea what I can try next?
Thanks!
Justin.
[Thomas Adam] You haven't told us how you mount your NFS share -- i.e. what options you have contained in /etc/fstab. You can control the data rates with:
wsize= rsize=
which are values you can specify (usually in KiB) so that you don't throttle anything.
Pretty standard options:
l2:/d3 /l2/d3 nfs rw,hard,intr,nfsvers=3D3 0 0
These options are on three boxes, each with its own NFS share and I only have the problem on 1 machine.
The problem is solved.
The switch I was using went bad.