nfs-attribute-cache · shipping · also NFS metadata attribute cache

NFS attribute cache

An NFS attribute cache is a client-side copy of file or directory metadata reused until refresh or revalidation is required.

Related Observatory article: Read on hesela.com

Metadata such as size and change information is not the file's cached payload. By default the Linux client keeps regular-file attributes for at least 3 s and at most 60 s, and directory attributes for 30 s to 60 s, before asking the server again. [1]

Linux actimeo sets all four attribute-cache timers to one value, while noac additionally makes application writes synchronous, so they are not interchangeable settings. With noac every attribute check goes to the server, at the cost of many extra network operations. [1] An NFSv4 client may validate cached attributes by fetching only change and time_access, and it may hold modified values only for size, time_modify and change. [2]

Attribute freshness does not create an atomic snapshot across multiple files, and caches on different clients may observe server changes in different orders. All attributes of one file are cached as a unit, with an upper bound on how long an entry may go unrefreshed. [2]

Relations

related
NFS change attribute, NFS, Close-to-open consistency, NFSv4 file delegation, Page cache, NFS lookup cache

Advantages

  • Cached attributes avoid repeated GETATTR requests and reduce network and server load. [2, 1]

Limitations

  • Disabling attribute caching does not disable all file-data caching or eliminate every coherence race. [1]
  • Timestamps changed on the server reach applications only after the client retrieves fresh attributes. [1]

Citations

  1. nfs-utils nfs(5), Debian trixie: data and metadata coherence and version-specific cto/nocto options. (accessed 2026-10-23)
  2. Haynes and Noveck (editors). NFS Version 4 Protocol. RFC 7530, sections 10.3, 10.4 and 10.6 (NFSv4.0). (accessed 2026-10-23)

Further reading

  1. NFS stable writes: what COMMIT, flush and FUA actually promise (accessed 2026-10-14)
Sources & caveats
  • nfs-client is nfs(5) from nfs-utils 2.8.3 on Debian trixie, re-read for the ac, noac, acregmin, acregmax, acdirmin, acdirmax and actimeo options and the coherence section.
  • rfc7530 is the NFSv4.0 specification, re-read in section 10.6 for attribute caching rules.
  • The direct-io entry links here because nfs(5) names O_DIRECT as the way to disable data caching that noac leaves in place.

JSON: /data/terms/nfs-attribute-cache.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. NFS attribute cache. Hesela. 2026-10-23. https://hesela.dev/terms/nfs-attribute-cache/