Coda File System

Re: Caching mechanism

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: Sat, 24 Nov 2012 19:34:45 -0500
Dhaivat Pandya <dhaivatpandya_at_gmail.com> writes:

> Does Venus attempt to do any sort of predictive prefetching/caching aside
> from the user specified HDB entries?

Prefetching and caching are quite different.  Venus will cache files
that it reads, either due to VFS requests or hoarding.  I am unaware of
any prefetching.  For example, one could have venus read (into the
cache) files in a directory if the directory is read.  That doesn't
sound like a good plan, because a directory of large files is something
that might be listed but not entirely traversed.

Were I to investigate prefetching, I'd add:

  1) stat files in a directory when the directory is read

  2) if any of those files are directories, fault them into the cache
  (but don't 1 until there's a real VFS call)

Before doing this, I'd want to have some sort of priority queueing by
request uid or reason, so that prefetches don't compete with real
requests.  And probably analyze some traces, although user behavior
adapts to FS behavior, so the actual question of what's best is far
trickier than it might at first seem.

Received on 2012-11-24 19:51:38