Skip to contentSkip to conversation

nfs(5): adding new mount option 'fasc'

PATCH In review Chengen Du 4 participants 5 messages Aug 28, 2023 – Nov 14, 2023

Subsystems (2)
lore
Share & tools
lore

Chengen Du

author
#0 lore raw

PATCH v3 1/1 nfs(5): adding new mount option 'fasc'

Add an option that triggers the clearing of the file access cache as soon as the cache timestamp becomes older than the user's login time.

---
 utils/mount/nfs.man | 13 +++++++++++++
 1 file changed, 13 insertions(+)
utils/mount/nfs.man +13 -0
index 9b4bc9c9..2ac7b4ad 100644
@@ -608,6 +608,19 @@ option is not specified,
 the default behavior depends on the kernel version,
 but is usually equivalent to
 .BR "xprtsec=none" .
+.TP 1.5i
+.BI fasc
+Triggers the clearing of the file access cache as soon as the cache 
+timestamp becomes older than the user's login time. It is supported 
+in kernels 6.4 and later.
+.IP
+NFS servers often refresh their users' group membership at their 
+own cadence, which means the NFS client's file access cache can 
+become stale if the user's group membership changes on the server 
+after they've logged in on the client. To align with the principles 
+of the POSIX design, which only refreshes the user's supplementary 
+group information upon login, the mechanism uses the user's login 
+time to determine whether the file access cache needs to be refreshed.
 .SS "Options for NFS versions 2 and 3 only"
 Use these options, along with the options in the above subsection,
 for NFS versions 2 and 3 only.
Signature · 1 line
2.39.2
#1 lore raw

Hello,

My apologies on this delay...

Quoted 5 lines · Chengen Du

Add an option that triggers the clearing of the file access cache as soon as the cache timestamp becomes older than the user's login time.

On a 6.7-rc0 kernel I'm getting "nfs: Unknown parameter 'fasc'" error... was this never implemented?

steved.

Quoted 28 lines
---
  utils/mount/nfs.man | 13 +++++++++++++
  1 file changed, 13 insertions(+)
utils/mount/nfs.man +13 -0
index 9b4bc9c9..2ac7b4ad 100644
@@ -608,6 +608,19 @@ option is not specified,
  the default behavior depends on the kernel version,
  but is usually equivalent to
  .BR "xprtsec=none" .
+.TP 1.5i
+.BI fasc
+Triggers the clearing of the file access cache as soon as the cache
+timestamp becomes older than the user's login time. It is supported
+in kernels 6.4 and later.
+.IP
+NFS servers often refresh their users' group membership at their
+own cadence, which means the NFS client's file access cache can
+become stale if the user's group membership changes on the server
+after they've logged in on the client. To align with the principles
+of the POSIX design, which only refreshes the user's supplementary
+group information upon login, the mechanism uses the user's login
+time to determine whether the file access cache needs to be refreshed.
  .SS "Options for NFS versions 2 and 3 only"
  Use these options, along with the options in the above subsection,
  for NFS versions 2 and 3 only.
#2 lore raw
Quoted 4 lines · Steve Dickson

Hello,

My apologies on this delay...

Quoted 9 lines
Quoted 5 lines · Chengen Du

Add an option that triggers the clearing of the file access cache as soon as the cache timestamp becomes older than the user's login time.

On a 6.7-rc0 kernel I'm getting "nfs: Unknown parameter 'fasc'" error... was this never implemented?

No. There are no plans to add any mount parameters for this functionality.

Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]
#3 lore raw
Quoted 10 lines · Trond Myklebust
Quoted 9 lines · Steve Dickson

Hello,

My apologies on this delay...

Quoted 4 lines · Chengen Du

Add an option that triggers the clearing of the file access cache as soon as the cache timestamp becomes older than the user's login time.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

On a 6.7-rc0 kernel I'm getting "nfs: Unknown parameter 'fasc'" error... was this never implemented?

No. There are no plans to add any mount parameters for this functionality.

Thank you!

steved.

Quoted 1 line
#4 lore raw
Quoted 14 lines · Steve Dickson
Quoted 10 lines · Trond Myklebust
Quoted 9 lines · Steve Dickson

Hello,

My apologies on this delay...

Quoted 4 lines · Chengen Du

Add an option that triggers the clearing of the file access cache as soon as the cache timestamp becomes older than the user's login time.

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

On a 6.7-rc0 kernel I'm getting "nfs: Unknown parameter 'fasc'" error... was this never implemented?

No. There are no plans to add any mount parameters for this functionality.

Thank you!

Just to add, we still revert the patches that changed the default behaviour from v6.2 onwards.

We found that the access cache not only gets wiped by interactive user logins, but also various automated processes (e.g. sar/systat collection) that also frequently "login" across all our clients.

When you scale this up across thousands of clients (render farm), the result was a 40% increase in (ACCESS) IOPs to our netapps and a 20% increase in their CPU usage. So we will continue to revert the patches for as long as we can.

Cheers,

Daire