FS-Cache

Local Caching For Network Filesystems

Submitted by Jeremy
on February 21, 2008 - 11:35am

"These patches add local caching for network filesystems such as NFS," began David Howells describing an updated set of thirty-seven patches to introduce FS-Cache. When asked how the patches affect performance, he noted that this was dependent on the use case, highlighting issues when dealing with lots of metadata, "getting metadata from the local disk fs is slower than pulling it across an unshared gigabit ethernet from a server that already has it in memory."

David continued "these points don't mean that fscache is no use, just that you have to consider carefully whether it's of use to *you* given your particular situation, and that depends on various factors," adding, "note that currently FS-Caching is disabled for individual NFS files opened for writing as there's no way to handle the coherency problems thereby introduced." He concluded with a number of simple performance benchmarks.

Generic Filesystem Caching Facility

Submitted by Jeremy
on September 24, 2007 - 5:24pm
Linux news

"The attached patch adds a generic intermediary (FS-Cache) by which filesystems may call on local caching capabilities, and by which local caching backends may make caches available," explained David Howells describing his "generic filesystem caching facility" patch. In his patchset he also provided a patch to make NFS utilize the generic caching facility. David went on to detail thirteen facilities provided by the patch, including:

"(1) Caches can be added / removed at any time, even whilst in use; (2) Adds a facility by which tags can be used to refer to caches, even if they're not mounted yet; (3) More than one cache can be used at once. Caches can be selected explicitly by use of tags; (4) The netfs is provided with an interface that allows either party to withdraw caching facilities from a file (required for (1)); (5) A netfs may annotate cache objects that belongs to it; (6) Cache objects can be pinned and reservations made; (7) The interface to the netfs returns as few errors as possible, preferring rather to let the netfs remain oblivious."