Re: Does FreeBSD 13 disable the VEV cache in ZFS ?

2021-05-14 Thread Pete French
> 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

As predicted, all zero, apart from bshift which is 16 and max which is 16384


> 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

Ah, thats the thing I should have found msyelf I guess! :-) Actually, if smarter
people than me think that its not useful on OpenZFS, then I shall probably
leave it disabled. Generally people have a good reason for doing things.

I shall have a read,and thankyou for confirming this (and thankyou for
maintinaing zfs-stats! which is an invalauble tool I have found over the years)


-pete.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Does FreeBSD 13 disable the VEV cache in ZFS ?

2021-05-14 Thread Stefan Esser
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



OpenPGP_signature
Description: OpenPGP digital signature