Re: NUMA settings

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Marc Rechté <marc4(at)rechte(dot)fr>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: NUMA settings
Date: 2020-04-29 08:50:54
Message-ID: e4d2e9c66efebc14e7f13ed2c26171f7cd9f85ac.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 2020-04-29 at 08:54 +0200, Marc Rechté wrote:
> I am trying to figure out the recommended settings for a PG dedicated
> machine regarding NUMA.
>
> I assume that the shared buffers are using Huge Phages only. Please
> correct if I am wrong:
>
> 1) postgres is started with numactl --interleave=all, in order to spread
> memory pages evenly on nodes.
> 2) wm.swappiness is left to the default 60 value, because Huge Pages
> never swap, and we wish the idle backend to be swapped out if necessary.
> 3) vm.zone_reclaim_mode = 0. I am not sure it is the right choice.
> 4) kernel.numa_balancing = 1. Only if it is confirmed that it will not
> affect postgres, because started with the interleave policy.

I am not the top expert on this, but as far as I can tell:

- Disabling NUMA is good if you want to run a single database cluster
on the machine that should use all resources.

If you want to run several clusters that share the resources, leaving
NUMA support enabled might be the better thing to do.

- If you can, disable NUMA in the BIOS, on as low a level as possible.

- I think "kernel.numa_balancing" should be 0.

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Moises Lopez 2020-04-29 19:21:37 Re: The query plan get all columns but I'm using only one column.
Previous Message Marc Rechté 2020-04-29 06:54:08 NUMA settings