23.07.18 18:12, Mark Martinec wrote:
After upgrading an older AMD host from FreeBSD 10.3 to 11.1-RELEASE-p11
(amd64), ZFS is gradually eating up all memory, so that it crashes every
few days when the memory is completely exhausted (after swapping heavily
for a couple of hours).
I've been in the same situation. ZFS, only pool, no ZFS errors.
I think the problem is rather between swapping and ZFS ARC. This host
has different load, sometimes it needs more active memory, somtimes
less... This means that active zone can expand and shrink like +-2G os
mem (I have 16Gb installed there). The problem is, when huge task is
idle it doesn't use much active memory and other activity is pushing
it's memory to the swap. When active runs low and ARC runs >50% of
memory it becomes very hard to make ARC give some memory back. My host
even was broght to the point when it couldn't get tasks back into memory
from swap, because while some pages were restored from swap the time
passes by and the other pages are instead stored to swap due to zome ARC
activity. Finally active zone shrinks so bad that the host becomes
unresponsive.
Like 6 month ago I tried tweaking kernel and swap to make things go
other way. Currently I have `vm.swap_idle_enabled=1` in /etc/loader.conf
and looks like this solves my problem. The other interesting things to
look at are `vfs.zfs.arc_free_target`, `vfs.zfs.arc_shrink_shift`,
`vfs.zfs.arc_grow_retry`.
Or you can take another route and plain limit current ARC size with
`vfs.zfs.arc_max`.
Hope that helps.
--
Sphinx of black quartz judge my vow.
_______________________________________________
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"