pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
RHEL-8 Kernel Settings
5+ messages / 4 participants
[nested] [flat]

* RHEL-8 Kernel Settings
@ 2021-06-10 18:06 John Wiencek <jwiencek3@comcast.net>
  2021-06-11 06:56 ` Re: RHEL-8 Kernel Settings Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 5+ messages in thread

From: John Wiencek @ 2021-06-10 18:06 UTC (permalink / raw)
  To: Pgsql-admin <pgsql-admin@lists.postgresql.org>

Hello

I’m looking for assistance in determining kernel setting for a VM RHEL-8 linux server running postgresql-13.


I have 3 server groupings

1)   2 vcpu’s  8gb memory
2)   4 cpu’s 16gb memory
3)   8 cpu’s 32gb memory

I’ve read various articles and the PostgreSQL documentation .   Does anyone have practical experiences doing this kind of set up

Do kernel setting requirements change based on the number of cpu’s and amount of memory?    I’ve not read any mention of this.


Regards

John W






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: RHEL-8 Kernel Settings
  2021-06-10 18:06 RHEL-8 Kernel Settings John Wiencek <jwiencek3@comcast.net>
@ 2021-06-11 06:56 ` Laurenz Albe <laurenz.albe@cybertec.at>
  2021-06-11 07:06   ` Re: RHEL-8 Kernel Settings Johannes Truschnigg <johannes@truschnigg.info>
  2021-06-11 09:07   ` Re: RHEL-8 Kernel Settings Jwiencek3 <jwiencek3@comcast.net>
  0 siblings, 2 replies; 5+ messages in thread

From: Laurenz Albe @ 2021-06-11 06:56 UTC (permalink / raw)
  To: John Wiencek <jwiencek3@comcast.net>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

On Thu, 2021-06-10 at 13:06 -0500, John Wiencek wrote:
> I’m looking for assistance in determining kernel setting for a VM RHEL-8 linux server running postgresql-13.
> 
> I have 3 server groupings
> 
> 1)   2 vcpu’s  8gb memory
> 2)   4 cpu’s 16gb memory
> 3)   8 cpu’s 32gb memory
> 
> I’ve read various articles and the PostgreSQL documentation .   Does anyone have practical experiences doing this kind of set up
> 
> Do kernel setting requirements change based on the number of cpu’s and amount of memory?    I’ve not read any mention of this.

I recommend setting

  vm.overcommit_memory = 2
  vm.overcommit_ratio (the correct value depends on your swap)
  vm.swappiness = 0

Also, disable Transparent Hugepages.

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






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: RHEL-8 Kernel Settings
  2021-06-10 18:06 RHEL-8 Kernel Settings John Wiencek <jwiencek3@comcast.net>
  2021-06-11 06:56 ` Re: RHEL-8 Kernel Settings Laurenz Albe <laurenz.albe@cybertec.at>
@ 2021-06-11 07:06   ` Johannes Truschnigg <johannes@truschnigg.info>
  2021-06-11 07:12     ` Re: RHEL-8 Kernel Settings Laurenz Albe <laurenz.albe@cybertec.at>
  1 sibling, 1 reply; 5+ messages in thread

From: Johannes Truschnigg @ 2021-06-11 07:06 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On Fri, Jun 11, 2021 at 08:56:13AM +0200, Laurenz Albe wrote:
> [...]
> I recommend setting
>
>   vm.overcommit_memory = 2

Be careful with this though, most applications no not allocate memory as
thoughtfully as Postgres - so if your server is running any other kind of
service/software in addition to Postgres, you should make sure that can
survive Linux not overcommitting like there's no tomorrow, too.

-- 
with best regards:
- Johannes Truschnigg ( johannes@truschnigg.info )

www:   https://johannes.truschnigg.info/
phone: +43 650 2 133337
xmpp:  johannes@truschnigg.info

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: RHEL-8 Kernel Settings
  2021-06-10 18:06 RHEL-8 Kernel Settings John Wiencek <jwiencek3@comcast.net>
  2021-06-11 06:56 ` Re: RHEL-8 Kernel Settings Laurenz Albe <laurenz.albe@cybertec.at>
  2021-06-11 07:06   ` Re: RHEL-8 Kernel Settings Johannes Truschnigg <johannes@truschnigg.info>
@ 2021-06-11 07:12     ` Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 5+ messages in thread

From: Laurenz Albe @ 2021-06-11 07:12 UTC (permalink / raw)
  To: Johannes Truschnigg <johannes@truschnigg.info>; pgsql-admin@lists.postgresql.org

On Fri, 2021-06-11 at 09:06 +0200, Johannes Truschnigg wrote:
> On Fri, Jun 11, 2021 at 08:56:13AM +0200, Laurenz Albe wrote:
> > [...]
> > I recommend setting
> > 
> >   vm.overcommit_memory = 2
> 
> Be careful with this though, most applications no not allocate memory as
> thoughtfully as Postgres - so if your server is running any other kind of
> service/software in addition to Postgres, you should make sure that can
> survive Linux not overcommitting like there's no tomorrow, too.

On the contrary: if there is some software that allocates memory like crazy,
you want to disable overcommit, so that you get a nice OOM error rather
than killed processes, which result in PostgreSQL going through crash
recovery.

But I think that running such a misbehaving program on a database
machine is a bad idea.

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






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: RHEL-8 Kernel Settings
  2021-06-10 18:06 RHEL-8 Kernel Settings John Wiencek <jwiencek3@comcast.net>
  2021-06-11 06:56 ` Re: RHEL-8 Kernel Settings Laurenz Albe <laurenz.albe@cybertec.at>
@ 2021-06-11 09:07   ` Jwiencek3 <jwiencek3@comcast.net>
  1 sibling, 0 replies; 5+ messages in thread

From: Jwiencek3 @ 2021-06-11 09:07 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

Other than HugePages are any other settings determined by the amount of memory on a server?

John 

Sent from my iPad

> On Jun 11, 2021, at 1:56 AM, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> 
> On Thu, 2021-06-10 at 13:06 -0500, John Wiencek wrote:
>> I’m looking for assistance in determining kernel setting for a VM RHEL-8 linux server running postgresql-13.
>> 
>> I have 3 server groupings
>> 
>> 1)   2 vcpu’s  8gb memory
>> 2)   4 cpu’s 16gb memory
>> 3)   8 cpu’s 32gb memory
>> 
>> I’ve read various articles and the PostgreSQL documentation .   Does anyone have practical experiences doing this kind of set up
>> 
>> Do kernel setting requirements change based on the number of cpu’s and amount of memory?    I’ve not read any mention of this.
> 
> I recommend setting
> 
>  vm.overcommit_memory = 2
>  vm.overcommit_ratio (the correct value depends on your swap)
>  vm.swappiness = 0
> 
> Also, disable Transparent Hugepages.
> 
> Yours,
> Laurenz Albe
> -- 
> Cybertec | https://www.cybertec-postgresql.com
> 






^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2021-06-11 09:07 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 18:06 RHEL-8 Kernel Settings John Wiencek <jwiencek3@comcast.net>
2021-06-11 06:56 ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-06-11 07:06   ` Johannes Truschnigg <johannes@truschnigg.info>
2021-06-11 07:12     ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-06-11 09:07   ` Jwiencek3 <jwiencek3@comcast.net>

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