bhyve and vfs.zfs.arc_max, and zfs tuning for a hypervisor

Victor Sudakov vas at mpeks.tomsk.su
Thu Mar 21 02:38:35 UTC 2019


Matt Churchyard wrote:
> > 
> > > 1. Does ARC actually cache zfs volumes (not files/datasets)?
> > 
> > Yes it does.
> 
> I find this distinction between volumes/files/etc and what is cached
> causes confusion (as well as "volumes not datasets").
> 
> Both ZVOLs and Z file systems are types of dataset. A dataset stores data
> in records (usually up to 128kb in size).  It's these records that are
> cached (and that most ZFS functions such as compression/raidz/zil/etc
> work with)
> 
> As far as the ZFS lower levels are concerned, there is no difference
> between a volume and a file system.

Thank you Matt, this was very instructive.

> > > 2. If ARC does cache volumes, does this cache make sense on a 
> > > hypervisor, because guest OSes will probably have their own disk cache anyway.
> > 
> > IMHO not much, because the guest OS is relying on the fact that when 
> > it writes it’s own cached data out to „disk“, it will be committed to 
> > stable storage.
> 
> Maybe I've missed something but I don't quite get the link between
> read cache (ARC) and guest writes here?

Maybe there was a confusion between read and write caches, but my
question still stands:

Does it make sense to cache the same data (for reading too) twice: one time
in host's RAM (ZFS ARC) and the other time in guest's RAM (whatever fs the
guest uses, all modern OSes have disk caches)?

What do VMWare or VirtualBox do for this situation? Do they ever cache
their volumes in the hypervisor's RAM?

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49 at fidonet http://vas.tomsk.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20190321/5be068b4/attachment.sig>


More information about the freebsd-virtualization mailing list