Skip to content

Set grace period to 10 seconds for nfsv4#44

Open
phlax wants to merge 1 commit intoehough:developfrom
phlax:grace-period
Open

Set grace period to 10 seconds for nfsv4#44
phlax wants to merge 1 commit intoehough:developfrom
phlax:grace-period

Conversation

@phlax
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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