From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Steven Winfield <Steven(dot)Winfield(at)cantabcapital(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Advice on machine specs for growth |
Date: | 2018-09-20 16:29:07 |
Message-ID: | 050eac454fe64eaca639dd7f166ee1fb01bc9cad.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Susan Hurst | 2018-09-20 17:55:05 | array must have even number of elements |
Previous Message | Gabriel Furstenheim Milerud | 2018-09-20 15:21:07 | Re: Converting to number with given format |