NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: zfs pool behavior - is it ever freed?





On 27/07/2023 13:47, Michael van Elst wrote:

Swapping out userland pages is done much earlier, so with high ZFS
utilization you end with a system that has a huge part of real memory
allocated to the kernel. When you run out of swap (and processes
already get killed), then you see some effects on kernel data.

Now I might be reading it wrong but that suggest to me that it would be an awful idea to run ZFS on a system that needs memory for things other than filesystem caching as there is no way for those memory needs to force ZFS to give up its pool usage.

If I've read it right there needs to be a mechanism for memory pressure to force ZFS to release memory. Doing it after all the processes have been swapped to disk is way too late as the chances are the system will become non-responsive by then. From memory this was a problem FreeBSD had to solve as well.

Even with the conventional BSD FFS I have to set vm.filemin and vm.filemax to quite low values to stop the kernel prioritizing file system cache over process memory and thats on a system with 16GB of RAM. Without that tuning I'd regularly have processes effectively rendered unresponsive as they were completely swapped out in favor of FS cache.

What's the equivalent lever for ZFS?

Mike



Home | Main Index | Thread Index | Old Index