2012-01-09 4:14, Richard Elling пишет:
On Jan 7, 2012, at 8:59 AM, Jim Klimov wrote:

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?

See discussions on the ZFS intelligent prefetch algorithm. I think Ben 
description is the best general description:

And a more engineer-focused description is at:
  -- richard

Thanks for the pointers. While I've seen those articles
(in fact, one of the two non-spam comments in Ben's
blog was mine), rehashing the basics is always useful ;)

Still, how does VDEV prefetch play along with File-level
Prefetch? For example, if ZFS prefetched 64K from disk
at the SPA level, and those sectors luckily happen to
contain "next" blocks of a streaming-read file, would
the file-level prefetch take the data from RAM cache
or still request them from the disk?

In what cases would it make sense to increase the
zfs_vdev_cache_size? Does it apply to all disks
combined, or to each disk (or even slice/partition)

In fact, this reading got me thinking that I might have
a fundamental misunderstanding lately; hence a couple
of new yes-no questions arose:

Is it true or false that: ZFS might skip the cache and
go to disks for "streaming" reads? (The more I think
about it, the more senseless this sentence seems, and
I might have just mistaken it with ZIL writes of bulk

Is it true or false that: ARC might evict cached blocks
based on age (without new reads or other processes
requiring the RAM space)?

And I guess the generic answer to my original question
regarding intelligent pre-fetching of whole files is
that this should be done by scripts outside ZFS itself,
and that the read-prefetch as well as ARC/L2ARC is all
in place already. So if no other IOs occur, the disks
may spin down... if only not for those "nasty" writes
that may sporadically occur and which I'd love to see
pushed out to dedicated ZILs ;)

zfs-discuss mailing list

Reply via email to