Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Apr 2015 10:59:32 +0200
From:      "Ronald Klop" <ronald-lists@klop.ws>
To:        "David Magda" <dmagda@ee.ryerson.ca>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: protecting some processes from out-of-swap killer
Message-ID:  <op.xxwdxighkndu52@ronaldradial.radialsg.local>
In-Reply-To: <61abe503a5bc8550e1413fd1933bea62.squirrel@webmail.ee.ryerson.ca>
References:  <alpine.BSF.2.00.1504251316020.43520@woozle.rinet.ru> <20150425104336.GD13141@ivaldir.etoilebsd.net> <alpine.BSF.2.00.1504251407420.43520@woozle.rinet.ru> <op.xxsqzdq1kndu52@ronaldradial.radialsg.local> <61abe503a5bc8550e1413fd1933bea62.squirrel@webmail.ee.ryerson.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 Apr 2015 19:09:05 +0200, David Magda <dmagda@ee.ryerson.ca>  
wrote:

> 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.)
>
>

See sysctl vm.overcommit, which is also documented here:  
https://wiki.freebsd.org/SystemTuning and in man tuning(7).

Regards,
Ronald.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.xxwdxighkndu52>