Does FreeBSD 13 disable the VEV cache in ZFS ?

Stefan Esser se at freebsd.org
Fri May 14 12:27:07 UTC 2021


Am 14.05.21 um 10:34 schrieb Pete French:
> 
> Am just upgrading my machiens, and have noticed an oddity.
> This is on a machine runnign 12.2
> 
> # zfs-stats -D
> 
> ------------------------------------------------------------------------
> ZFS Subsystem Report				Fri May 14 08:30:50 2021
> ------------------------------------------------------------------------
> 
> VDEV Cache Summary:				88.31	m
> 	Hit Ratio:			31.20%	27.55	m
> 	Miss Ratio:			68.48%	60.47	m
> 	Delegations:			0.32%	284.97	k
> 
> ------------------------------------------------------------------------
> 
> 
> This is on a machine running 13.0
> 
> # zfs-stats -D
> 
> ------------------------------------------------------------------------
> ZFS Subsystem Report				Fri May 14 08:32:18 2021
> ------------------------------------------------------------------------
> 
> VDEV cache is disabled
> 
> ------------------------------------------------------------------------
> 
> Same config on both. So, is it really disabled, or is zfs-stats getting this
> wrong for some reason ? I cant find any refernbce to this in the release notes
> or by googling.

Hi Pete,

zfs-stats has last been modified by me to make it work with the sysctl names
changed by OpenZFS. (But I might have missed a few ...)

Could you check the values of the following sysctl variables:

vfs.zfs.vdev.cache_size
vfs.zfs.vdev.cache_bshift
vfs.zfs.vdev.cache_max
kstat.zfs.misc.vdev_cache_stats.misses
kstat.zfs.misc.vdev_cache_stats.hits
kstat.zfs.misc.vdev_cache_stats.delegations

On my system, vfs.zfs.vdev.cache_size is always 0 - and that results in the
message "VDEV cache is disabled" that you got, too. And I'd guess that the
kstat variables will all report 0, too (not surprising if the size is 0).


A quick web search reveals:

https://openzfs.github.io/openzfs-docs/Performance%20and%20Tuning/Module%20Parameters.html#zfs-vdev-cache-size

Quote:

Note: with the current ZFS code, the vdev cache is not helpful and in some
cases actually harmful. Thus it is disabled by setting the zfs_vdev_cache_size = 0


You may want to try setting "vfs.zfs.vdev.cache_size" (name changed, it used
to be cache.size instead of cache_size) in /boot/loader.conf and perform a
few performance tests. (I have not verified that the current implementation
actually uses and supports a value specified that way, though.)

Regards, STefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20210514/3f976b09/attachment.sig>


More information about the freebsd-stable mailing list