I want to limit ZFS memory usage because ZFS' normal behavior to suck up all memory just sucks balls.
Because, this makes other applications drop temporary memory, leading to reloading/rebuilding all possible stuff when needed, bogging down performance and introducing unwanted latencies and annoying screen redraws, only for stupid oversized useless zfs disk caching.
I noticed this after copying two disks. All memory was sucked up by ZFS cache, leaving only the bare minimum for other apps. After rebooting it was fine again. I want not to have to reboot after large copy actions, so I am looking to fix that issue.
Reading the FreeBSD ZFS tuning page I wonder whether the vfs.zfs.arc_max and vfs.zfs.vdev.cache.size parameters are mentioned only for i386.
Are these still being honored on amd64?
I am thinking of settings like, say,
Questions:
Is there a page detailing what exactly these settings do?
Would it be a good idea not to set vm.kmem_size, just vm.kmem_size_max to limit kernel memory size bloating up? Or would this be bad, for example, fragmenting memory?
Or, would it be better to set only the cache size limits?
And, what ratio should arc and vdev caches have?
Suggestions? Advices?
(An alternative would be the user_reserve_hint_pct variable - but this seems not available on FreeBSD. Having this would save one from reboot...)
Because, this makes other applications drop temporary memory, leading to reloading/rebuilding all possible stuff when needed, bogging down performance and introducing unwanted latencies and annoying screen redraws, only for stupid oversized useless zfs disk caching.
I noticed this after copying two disks. All memory was sucked up by ZFS cache, leaving only the bare minimum for other apps. After rebooting it was fine again. I want not to have to reboot after large copy actions, so I am looking to fix that issue.
Reading the FreeBSD ZFS tuning page I wonder whether the vfs.zfs.arc_max and vfs.zfs.vdev.cache.size parameters are mentioned only for i386.
Are these still being honored on amd64?
I am thinking of settings like, say,
Code:
vm.kmem_size="5G"
vm.kmem_size_max="5G"
vfs.zfs.arc_max="5G"
vfs.zfs.vdev.cache.size="5G"
Questions:
Is there a page detailing what exactly these settings do?
Would it be a good idea not to set vm.kmem_size, just vm.kmem_size_max to limit kernel memory size bloating up? Or would this be bad, for example, fragmenting memory?
Or, would it be better to set only the cache size limits?
And, what ratio should arc and vdev caches have?
Suggestions? Advices?
(An alternative would be the user_reserve_hint_pct variable - but this seems not available on FreeBSD. Having this would save one from reboot...)