On Jun 26, 2020, at 6:58 AM, Stefan Eßer <s...@freebsd.org> wrote: > Am 26.06.20 um 12:23 schrieb Peter Jeremy: >> On 2020-Jun-25 11:30:31 -0700, Donald Wilde <dwil...@gmail.com> wrote: >>> Here's 'pstat -s' on the i3 (which registers as cpu HAMMER): >>> >>> Device 1K-blocks Used Avail Capacity >>> /dev/ada0s1b 33554432 0 33554432 0% >>> /dev/ada0s1d 33554432 0 33554432 0% >>> Total 67108864 0 67108864 0% >> >> I strongly suggest you don't have more than one swap device on spinning >> rust - the VM system will stripe I/O across the available devices and >> that will give particularly poor results when it has to seek between the >> partitions. > [[...]] >> As a further piece of arcana, vm.pageout_oom_seq is a count that controls >> the number of passes before the pageout daemon gives up and starts killing >> processes when it can't free up enough RAM. "out of swap space" messages >> generally mean that this number is too low, rather than there being a >> shortage of swap - particularly if your swap device is rather slow. > > I'm not sure that this specific sysctl is documented in such a way > that it is easy to find by people suffering from out-of-memory kills. > > Perhaps it could be mentioned as a parameter that may need tuning in > the OOM message? > > And while it does not come up that often in the mail list, it might > be better for many kinds of application if the default was increased > (a longer wait for resources might be more acceptable than the loss > of all results of a long running computation).
The OOM issue is more pressing on platforms like FreeBSD/arm that tend to have low RAM and slow writable storage such as SD card. There have been several threads on the issues this creates (e.g., https://docs.freebsd.org/cgi/getmsg.cgi?fetch=228789+0+archive/2018/freebsd-arm/20180819.freebsd-arm <https://docs.freebsd.org/cgi/getmsg.cgi?fetch=228789+0+archive/2018/freebsd-arm/20180819.freebsd-arm>) that have led to some insight into how to tune the OOM killer. One thing that becomes clear is that the "Out of swap space" error message is misleading as often it really means "Couldn't obtain RAM in a timely fashion." On hardware such as the Raspberry Pi, it's often the case that the system has enough swap space: it's just that it can't write to swap on SD card before the default vm.pageout_oom_seq passes are exhausted and so the OOM killer starts reaping active processes (like the clang trying to build clang:), and all sorts of things start to break. :-) Cheers, Paul. _______________________________________________ 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"