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 1jVdsw-0006Q2-Og for pgsql-performance@arkaria.postgresql.org; Mon, 04 May 2020 16:24:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jVdst-0002DN-3y for pgsql-performance@arkaria.postgresql.org; Mon, 04 May 2020 16:23:59 +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 1jVdpo-0005kG-91 for pgsql-performance@lists.postgresql.org; Mon, 04 May 2020 16:20:48 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVdpm-00040y-5J for pgsql-performance@lists.postgresql.org; Mon, 04 May 2020 16:20:47 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D9DBE5C015B; Mon, 4 May 2020 12:20:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 04 May 2020 12:20:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm1; bh=2 yolDz17ihGaUsAgufjKzpvJcfJZI0NlyAlsoFcrzoE=; b=cXQFa/MP9jkdiEfuW vXwx/DuBJvhESuBfkj0g0b/Bij7eZbyyfZ7OT1F50bY1jM+ZNClmid8/SXxI50Nb ZUPfLT6Qh++hr5ZEDSRoPX+l49zkBblX1eGVOaYrP+lF5iOJ6nSQtpddgganv0Or RwznhGWTBEsljymnhP+Nkw/Eqs67Y+vzKmOHJ/8R6zx/2rndwPuVbWZRai4iqT5X lN5PlWmV/Cxf9s58neuuVNluNRuwfnmUOrTVqxRsF9Aot8YKgHWZoaw2VHUj2Ill RIQe4zQN603YYMZ0IWO2nOcdZvZ8rxR1rl3bn6pvk7xpFQzpSwqI9lnLdjtecoNI PC2UQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=2yolDz17ihGaUsAgufjKzpvJcfJZI0NlyAlsoFcrz oE=; b=cfIENdcOfImrNraHliz7uGAEBp4c7LV7+GvTvy+VNcdoNJdK7gStIwrwg kFA4bjZliQ7XZ8gOzVbHdM7Ws+/wqgfqUMqrRkmX1DDrGH4/LWk2PxPAePVQrqIj 3SrwFnt6QyqVsXc0rZptX3iAeqYmkjd9zNPWX8KcU7Gh2mS4JR34/a4iZ/Q9mlXV a7f2Gl1rBGVXOMMXVZFLw9Ri93PJIR41maWwCz1LdmZUzVsSa4MKdjJ23KcRyLFM rL98vSOoks0v8aWmsJ7pP0N2IZY+qPk3xYzZHaiVt0Dsuv4hJ1g/2P9IB3qo/Akm su5Z3J+vnAvCAwqrb+NZlR29dWnkA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrjeeggdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttddunecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpeejheeivdevffeijeffheegfeejveffteeviedugeegtdehffdvffekudek tdehjeenucfkphepieejrdduiedtrddvudejrddvhedtnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdr uggv X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id D1CAA3066016; Mon, 4 May 2020 12:20:43 -0400 (EDT) Date: Mon, 4 May 2020 09:20:42 -0700 From: Andres Freund To: Laurenz Albe Cc: Marc =?utf-8?Q?Recht=C3=A9?= , pgsql-performance@lists.postgresql.org Subject: Re: NUMA settings Message-ID: <20200504162042.3ctwpkg33trpyfdm@alap3.anarazel.de> References: <2d10f8ab-5fc6-a0a5-facf-68f35de95ea9@rechte.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2020-04-29 10:50:54 +0200, Laurenz Albe wrote: > 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 am doubtful that that's generally going to be beneficial. I think the strategy of starting postgres with interleave is probably a better answer. - Andres