Re: overcommit_ratio setting

From: Yi Sun <yinan81(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: overcommit_ratio setting
Date: 2021-06-15 00:34:26
Message-ID: CABWY_HDdBH4=BjzVKLRqd1uzOWzyN4sY4c51sfgWJ1km_AgBSg@mail.gmail.com
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.
>

Thank you for your reply

1. Our env RAM are 4GB, 8 GB, 16 GB... as below url suggestion, could we
configure swap as below?
https://opensource.com/article/18/9/swap-space-linux-systems

RAM swap

2GB – 8GB = RAM
>8GB 8GB

2. If the RAM is 4GB and 8GB, the formula (RAM - swap) / RAM * 100 result
will become to 0, how could we configure overcommit_ratio please?

Thank you

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Haseeb Khan 2021-06-15 05:42:40 Re: Master - Slave Replication Window Server
Previous Message Rory Campbell-Lange 2021-06-14 19:41:57 Re: Master - Slave Replication Window Server