Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set grace period to 10 seconds for nfsv4 #44

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

phlax
Copy link
Contributor

@phlax phlax commented Apr 24, 2020

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

@phlax phlax changed the title Set grace period to 10 seconds for nfsd Set grace period to 10 seconds for nfsv4 Apr 24, 2020
@ehough
Copy link
Owner

ehough commented Apr 25, 2020

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
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NFS4 initial command performance
3 participants