protecting some processes from out-of-swap killer
freebsd-stable-local at be-well.ilk.org
Thu Apr 30 13:51:05 UTC 2015
"David Magda" <dmagda at ee.ryerson.ca> writes:
> On Tue, April 28, 2015 05:51, Ronald Klop wrote:
>> The OS trying to kill a process is probably not what you want. So when you
>> protect(1) postgres the OS will kill another process, which I hope is not
>> running without reason.
>> My advice would be to
>> - or increase your swap space
>> - or tune postgresql to use less memory
>> - or limit tmpfs (tmpfs uses swap if RAM is short)
>> - or tune zfs to use less memory
> Personally I didn't even know FreeBSD had an OOM killer. I regularly run
> into Linux's though, but that's because by default Linux allows
> over-committing of memory.
> I was under the impression that FreeBSD did not over-subscribe memory, and
> so would not allow a process to do a malloc() unless there was enough
> RAM+swap to satisfy it.
> Is this a mistaken assumption? (I probably have to buy the McKusick,
> Neville-Neil, Watson book.)
Yes, that is a mistaken assumption; any system that supports fork(2)
pretty much has to do memory overcommit or make terribly inefficient use
of its memory.
Overcommit is irrelevant to your problem, though. You have processes
that are using more virtual memory than the system has.
More information about the freebsd-stable