Why may NFSv3 perform better than NFSv4.x?
Applies to
- ONTAP 9
- NFSv3 to 4.2
Answer
- There are several reasons:
- Locking is not required for NFSv3
- Locking adds more overhead for NFS clients and servers
- Locking also may require communication with other clients, adding further delays
- Each call is a separate RPC call in NFSv3
- This may be faster or slower depending on the workload
- Features like delegations offload requirements to other clients
- Other clients being required to handle delegations create extra delays
- NFSv4 retains state which may not perform as efficiently
- Older versions of Linux or ONTAP are not as optimized as newer versions for NFSv4.x optimal performance
- Locking is not required for NFSv3
Additional Information
- More detail is in the NFS best practices guide under Basic NFS concepts in NetApp ONTAP, File Locking.
- Higher CPU may be seen with heavy lock usage in NFSv4.x.
- Switching to NFSv3 will reduce CPU utilization in this scenario.
- It should be noted that NFSv4 may perform better in some circumstances.
- This KB is not suggesting NFSv3 will always be faster, but testing should be done to confirm for your application needs which is better.