Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVsfu-0003dq-Kb for pgsql-performance@arkaria.postgresql.org; Tue, 05 May 2020 08:11:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jVsft-0002cF-Be for pgsql-performance@arkaria.postgresql.org; Tue, 05 May 2020 08:11:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVsft-0002c0-57 for pgsql-performance@lists.postgresql.org; Tue, 05 May 2020 08:11:33 +0000 Received: from 11.mo4.mail-out.ovh.net ([46.105.34.195]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVsfl-0003qJ-Qy for pgsql-performance@lists.postgresql.org; Tue, 05 May 2020 08:11:31 +0000 Received: from player691.ha.ovh.net (unknown [10.110.208.89]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id 5860A229FF9 for ; Tue, 5 May 2020 10:11:22 +0200 (CEST) Received: from rechte.fr (unknown [80.215.236.230]) (Authenticated sender: marc4@rechte.fr) by player691.ha.ovh.net (Postfix) with ESMTPSA id 9446B121D309A for ; Tue, 5 May 2020 08:11:21 +0000 (UTC) Subject: Re: NUMA settings To: pgsql-performance@lists.postgresql.org References: <2d10f8ab-5fc6-a0a5-facf-68f35de95ea9@rechte.fr> <20200504162042.3ctwpkg33trpyfdm@alap3.anarazel.de> <60b780e9d34ea8a6be80193ec03ab16a160fd1eb.camel@cybertec.at> From: =?UTF-8?Q?Marc_Recht=c3=a9?= Message-ID: <9149ca0b-3e36-9df2-1ea5-2ad3af7968de@rechte.fr> Date: Tue, 5 May 2020 10:11:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <60b780e9d34ea8a6be80193ec03ab16a160fd1eb.camel@cybertec.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB-large Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2281354687347415117 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrjeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeforghrtggptfgvtghhthoruceomhgrrhgtgeesrhgvtghhthgvrdhfrheqnecuggftrfgrthhtvghrnhepieeiiedvffelvdekfeegvedujefgheettdefhedufeetleeggfejvdetudefvefhnecukfhppedtrddtrddtrddtpdektddrvdduhedrvdefiedrvdeftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrheiledurdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepmhgrrhgtgeesrhgvtghhthgvrdhfrhdprhgtphhtthhopehpghhsqhhlqdhpvghrfhhorhhmrghntggvsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > 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.