From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Steven Winfield <Steven.Winfield@cantabcapital.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Advice on machine specs for growth
Date: Thu, 20 Sep 2018 18:29:07 +0200
Message-ID: <050eac454fe64eaca639dd7f166ee1fb01bc9cad.camel@cybertec.at> (raw)
In-Reply-To: <E9FA92C2921F31408041863B74EE4C2001B16F20F2@CCPMAILDAG03.cantab.local>
References: <20180918135705.thfl6jllgcf5v3i3@campbell-lange.net>
<73d25c37c98cebd99cbee57583502aeb3bdd6c0e.camel@cybertec.at>
<E9FA92C2921F31408041863B74EE4C2001B16F20F2@CCPMAILDAG03.cantab.local>
Steven Winfield wrote:
> Just to be clear, are you suggesting (on linux) setting overcommit_memory = 2
> but leaving overcommit_ratio alone, which defaults to 50%?
> I’ve tried setting them to 2 and 0% respectively in the past and it didn’t end well…
Yes, vm.overcommit_memory = 2
As for vm.overcommit ratio, set it to 100 * (RAM - swap) / RAM
That is because Linux will commit memory up to
swap + overcommit_ratio * RAM / 100, and you don't want to commit more
than the available RAM.
> Also I’ve read, and now use, swappiness = 1 which is supposed to disable swapping
> entirely except when not swapping would cause OOM.
> Any thoughts on that?
My thought is vm.swappiness = 0
If you don't overcommit memory, you should never have to swap.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, Steven.Winfield@cantabcapital.com
Subject: Re: Advice on machine specs for growth
In-Reply-To: <050eac454fe64eaca639dd7f166ee1fb01bc9cad.camel@cybertec.at>
References: <20180918135705.thfl6jllgcf5v3i3@campbell-lange.net> <73d25c37c98cebd99cbee57583502aeb3bdd6c0e.camel@cybertec.at> <E9FA92C2921F31408041863B74EE4C2001B16F20F2@CCPMAILDAG03.cantab.local> <050eac454fe64eaca639dd7f166ee1fb01bc9cad.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox