Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a small LAN that has a couple of Linux boxes (Ubuntu 9.10) with NFS shares on them. The boxes are networked with a consumer grade Netgear router (model WGR614V9) and using wired connections.

When I first set up the NFS shares, I noticed that performance was pretty terrible. For example, it would take a few minutes to copy 40 mbs worth data from a mounted NFS share to local disk.

By playing around with the NFS configuration, I was able to get things running reasonably well. The configuration I settled on for the system exporting the share was:

# /etc/exports On the machine exporting the NFS share:
/exprt/dir client.ip (rw,async,no_root_squash,no_subtree_check)

For the NFS client, I have

# /etc/fstab
server.ip:/exprt/dir on /imprt/dir type nfs (rw,noatime,rsize=32768,wsize=32768,timeo=14,intr)

However, while this seems to work reasonably well for me, it still seems to be faster to copy files from one system to the other using scp than it is using NFS.

I thought it would be worth asking what NFS configurations other people might be using on similar network set ups that results in reasonably good performance. I know NFS can be pretty sensitive to things like choice of OS and precise network configuration. But, I suspect the set up I have is pretty common amount other users with small local networks, so it would be useful to hear what configuration works best for them.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

NFS should easily outperform SSHFS. Can you show some specific numbers?

if you run on your server..

dd if=/dev/zero of=test.a bs=1M count=100
dd if=/dev/zero of=test.b bs=1M count=100

then can you do

dd if=/imprt/dir/test.a of=/dev/null
dd if=/path/to/sshfs/mount/dir/test.b of=/dev/null

and post the output?

also, you might want to export the shares under /export and use autofs with auto.net on the clients. which makes all the machines on the lan use the same /net/$hostname/export/foo path structure.

share|improve this answer
    
I was just looking at scp performance vs. NFS, not SSHFS vs. NFS. But, thanks for the pointer to SSHFS. SSHFS looks useful for mounting boxes remotely. –  dmcer Jan 20 '10 at 5:46
    
oh, my bad.. the performance of sshfs should match what you see with scp anyway :-) –  user23307 Jan 20 '10 at 12:27
    
Interesting, with the current configuration, NFS is about equal to SSHFS. NFS: dd if=NFSmnt/test.a of=/dev/null 104857600 bytes (105 MB) copied, 8.95725 s, 11.7 MB/s SSFS: dd if=SSHFSmnt/test.b of=/dev/null 104857600 bytes (105 MB) copied, 9.14158 s, 11.5 MB/s –  dmcer Jan 20 '10 at 23:41
    
Interesting indeed. Can you come up with a repeatable test that reproduces the problem you first described? –  user23307 Jan 21 '10 at 2:16
1  
in the numbers you showed NFS was faster, though it was only by .2 seconds. The rates you are getting indicate you are maxing out a 100mbit link, so your bottle neck is that, and not NFS or SSH. –  user23307 Jan 21 '10 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.