Re: overcommit_ratio setting

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Yi Sun <yinan81(at)gmail(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: overcommit_ratio setting
Date: 2021-06-14 16:18:23
Message-ID: 8f67083bf8fee0c8af858d1b47b6505ebb106c93.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, 2021-06-14 at 18:16 +0800, Yi Sun wrote:
> After checking doc, only mentioned vm.overcommit_memory=2, but didn't mentioned vm.overcommit_ratio recommended value
> https://www.postgresql.org/docs/11/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT
> some articles mentioned that 80 or 90 configuration in their env
> So is it OK just to configure vm.overcommit_ratio to 90 please?

It depends on the size of RAM and swap space:

overcommit_ratio < (RAM - swap) / RAM * 100

Here, RAM is the RAM available to PostgreSQL.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Manuel Weitzman 2021-06-14 17:25:38 Re: Planning performance problem (67626.278ms)
Previous Message Julien Rouhaud 2021-06-14 14:14:23 Re: overcommit_ratio setting