I wonder if it is possible (currently or in the future as an RFE)
to tell ZFS to automatically read-ahead some files and cache them
in RAM and/or L2ARC?

One use-case would be for Home-NAS setups where multimedia (video
files or catalogs of images/music) are viewed form a ZFS box. For
example, if a user wants to watch a film, or listen to a playlist
of MP3's, or push photos to a wall display (photo frame, etc.),
the storage box "should" read-ahead all required data from HDDs
and save it in ARC/L2ARC. Then the HDDs can spin down for hours
while the pre-fetched gigabytes of data are used by consumers
from the cache. End-users get peace, quiet and less electricity
used while they enjoy their multimedia entertainment ;)

Is it possible? If not, how hard would it be to implement?

In terms of scripting, would it suffice to detect reads (i.e.
with DTrace) and read the files to /dev/null to get them cached
along with all required metadata (so that mechanical HDDs are
not required for reads afterwards)?

//Jim Klimov
zfs-discuss mailing list

Reply via email to