ehough / docker-nfs-server

A lightweight, robust, flexible, and containerized NFS server.
https://hub.docker.com/r/erichough/nfs-server/
GNU General Public License v3.0
669 stars 221 forks source link

Set grace period to 10 seconds for nfsv4 #44

Open phlax opened 4 years ago

phlax commented 4 years ago

Set the default grace-period to 10 seconds.

Fixes #22

Not sure if this should be configurable or where best to put the flag.

In my limited testing this speeds up initial file access on an nfsv4 mount from ~100s to <1s

Not sure why the grace period is set so long by default

Im also unclear as to why setting 10 for the grace period cuts the time to under a second - the man page seems to suggest that the grace-period is measured in seconds:

https://manpages.debian.org/stretch/nfs-kernel-server/nfsd.8.en.html

ehough commented 4 years ago

This looks great! Thank you for the contribution! Let me do a quick round of testing on my end and then I'll merge.

Im also unclear as to why setting 10 for the grace period cuts the time to under a second - the man page seems to suggest that the grace-period is measured in seconds:

I also am not sure why. I peeked at the source for nfsd and confirmed it uses seconds for the unit. ¯\_(ツ)_/¯

michael-borkowski commented 5 months ago

Hi, as I'm facing issue #48 as well, I stumbled upon this PR. Is there any objection to merging it? I'm also affected by the 90-second grace period, not sure why it's there, but it makes my NFS server unusable for 90s after container startup. Thanks!