On 28 Feb 2025, at 20:36, Greg A. Woods <woods(a)robohack.ca> wrote:
That's probably mostly true, but also misguided
and ignorant of the
actual behaviour of RAM-starved systems. I suspect it was policy based
on memory prices at some time in the past, but seemingly hasn't been
re-evaluated for modern workloads more recently.
I strongly agree: as an old Unix hand hitting swap was something you wanted to avoid at
all cost, except for certain cases where swap use could be replaced by accurate use of
files to swap data in and out of RAM during programme execution because of the
predictability of data accesses. It was still bad programming but not as lethal as
thrashing.
The current macOS is a disappointment in that respect: on a 64GB machine when running the
Apple Virtualisation Framework for VMs (UTM and Parallels) I am surprised at how just a
couple of 8GB VMs can send the VMM into a frenzy.
My FreeBSD bhyve hosts with similar memory and VM load do not exhibit this behaviour at
all, despite ZFS ARC.
Arrigo