Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having problems with two systems (a Solaris client and Linux server) using NFS v3 to mount home directories. (NFS v4 simply doesn't work at all, for what I'm told by another sysadmin here is a "known issue".) NFS v2 appears to work properly.

My question is this: what are the tradeoffs between using NFS v2 and NFS v3? I need to make a decision as to whether to keep trying to debug this problem or just deciding to live with NFS v2 for this one client.

I know there's a file size limit with v2, although I've seen conflicting information -- is it a 2 GB or 4GB limit? There's also a performance penalty to v2; is it possible to quantify the speed limitations with v2 in a general way, or does that depend too much on the specific systems and networks involved? (For what it's worth, I've got gigabit Ethernet between the systems.) What other tradeoffs are there between the two? Are there any security issues I should be aware of?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

In addition to existing answer.

NFSv3 has READDIRPLUS operation, which allows to get directory listing with file attributes at once - a big performance improvements on directory listing. Additionally, V3 has weak cache consistency, which keep client cache happy and allows client not to aswk for too much information. Plus, TCP as a transport. With UDP you may have data losses with big read-write IO buffer size. ACCESS call, allows client to re-use cached data if an other user wants to access the same file.

share|improve this answer
    
In fact, I wonder if the fact that v3 is over TCP by default could be the reason it's not working in the first place. Is there a firewall involved? You could try mounting with -o proto=udp to see. –  brontitall Jun 27 '13 at 3:34
    
The TRANSPORT METHODS section of the nfs man page nicely describes the differences of using TCP over UDP. –  tigran Jun 27 '13 at 7:04
add comment

According to wikipedia NFSv2 uses 32bit file size values, which limits it to 4GiB files, but apparently a common bug is to make the values signed, which limits it to 2GiB. NFSv3 also has async operations, and much optimised operations, so that less operations have to be done. This really has a big impact on performance, even on a LAN, since network latencies are something totally different from local machine latencies. NFSv2 should only be used if something doesn't support NFSv3. Try to find out why NFSv4 doesn't work. Maybe it's something you can fix.

share|improve this answer
add comment

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.