Re: Advice on machine specs for growth - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Advice on machine specs for growth
Date
Msg-id 050eac454fe64eaca639dd7f166ee1fb01bc9cad.camel@cybertec.at
Whole thread Raw
In response to RE: Advice on machine specs for growth  (Steven Winfield <Steven.Winfield@cantabcapital.com>)
List 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



pgsql-general by date:

Previous
From: Gabriel Furstenheim Milerud
Date:
Subject: Re: Converting to number with given format
Next
From: Susan Hurst
Date:
Subject: array must have even number of elements