From: Marc Rechté <marc4@rechte.fr>
To: pgsql-performance@lists.postgresql.org
Subject: Re: NUMA settings
Date: Tue, 5 May 2020 10:11:20 +0200
Message-ID: <9149ca0b-3e36-9df2-1ea5-2ad3af7968de@rechte.fr> (raw)
In-Reply-To: <60b780e9d34ea8a6be80193ec03ab16a160fd1eb.camel@cybertec.at>
References: <2d10f8ab-5fc6-a0a5-facf-68f35de95ea9@rechte.fr>
<e4d2e9c66efebc14e7f13ed2c26171f7cd9f85ac.camel@cybertec.at>
<20200504162042.3ctwpkg33trpyfdm@alap3.anarazel.de>
<fd8fb5bd-eac6-7491-f1e8-3761387d9d03@rechte.fr>
<60b780e9d34ea8a6be80193ec03ab16a160fd1eb.camel@cybertec.at>
> On Tue, 2020-05-05 at 07:56 +0200, Marc Rechté wrote:
>> Thanks for answers. Further readings make me think that we should *not*
>> start postgres with numactl --interleave=all: this may have counter
>> productive effect on backends anon memory (heap, stack). IMHO, what is
>> important is to use Huge Pages for shared buffers: they are allocated
>> (reserved) by the kernel at boot time and spread evenly on all nodes. On
>> top of that they never swap.
>>
>> My (temp) conclusions are following:
>> vm.zone_reclaim_mode = 0
>> kernel.numa_balancing = 0 (still not sure with that choice)
>> wm.swappiness = 60 (default)
>> start postgres as usual (no numactl)
>
> Thanks for sharing your insights.
>
> I think that "vm.swappiness" should be 0.
> PostgreSQL does its own memory management, any swapping by the kernel
> would go against that.
>
> Yours,
> Laurenz Albe
>
As said in the post, we wish the idle backends to be swapped out if
necessary. Therefore lowering swappiness would produce the opposite
effect: swapping out Linux file cache rather than backends memory.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: marc4@rechte.fr, pgsql-performance@lists.postgresql.org
Subject: Re: NUMA settings
In-Reply-To: <9149ca0b-3e36-9df2-1ea5-2ad3af7968de@rechte.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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