Обсуждение: RHEL-8 Kernel Settings

Поиск
Список
Период
Сортировка

RHEL-8 Kernel Settings

От
John Wiencek
Дата:
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
ofset up 

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


Regards

John W




Re: RHEL-8 Kernel Settings

От
Laurenz Albe
Дата:
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
kindof set up
 
> 
> Do kernel setting requirements change based on the number of cpu’s and amount of memory?    I’ve not read any mention
ofthis.
 

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




Re: RHEL-8 Kernel Settings

От
Johannes Truschnigg
Дата:
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

Вложения

Re: RHEL-8 Kernel Settings

От
Jwiencek3
Дата:
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
kindof set up 
>>
>> Do kernel setting requirements change based on the number of cpu’s and amount of memory?    I’ve not read any
mentionof 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
>