KB Article #177790

NFSV4 recommended values for both 'nfsv4gracetime' and 'nfsv4leasetime'

Problem

What are the recommended values for both 'nfsv4gracetime' and 'nfsv4leasetime' in a multi-node architecture?



Is there a best practice in regards of those parameters when in a multi-node architecture?



Resolution

Normally, the NFSV4 grace period should not be shorter than the lease period.


It corresponds to the period of time during which NFSV4 CLIENTS can recover their locks after a NFSV4 SERVER failure.


People interested in this topic can search google for "NFS recovery".

It exists tons of relevant literature about this topic.


The default value and the command that allows to configure a custom value for nfsv4 may vary depending on the O/S:


For example, under Linux based O/S:


- The default value is 90 seconds.


- The current value can be set to 2 minutes by the command:


echo 120 >/proc/fs/nfsd/nfsv4gracetime


This also applies to nvfv4leasetime, by the way, just changing the command accordingly.



We expect people that play with different values from the default ones know what they are doing. It can affect other applications running on the same system.


On systems where this parameter is tun-able, configuring a shorter value can reduce Transfer CFT node fail overs but it remains the user responsibility to verify possible side effect in regards of other applications.