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 1jTiQr-0003pU-8H for pgsql-performance@arkaria.postgresql.org; Wed, 29 Apr 2020 08:51:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTiQp-0008RJ-Uo for pgsql-performance@arkaria.postgresql.org; Wed, 29 Apr 2020 08:51:03 +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 1jTiQp-0008RA-Kf for pgsql-performance@lists.postgresql.org; Wed, 29 Apr 2020 08:51:03 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jTiQl-0004Qx-88 for pgsql-performance@lists.postgresql.org; Wed, 29 Apr 2020 08:51:02 +0000 Received: by mail-wr1-x433.google.com with SMTP id i10so1467437wrv.10 for ; Wed, 29 Apr 2020 01:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=P8FfOKvdGDgngebQW0D142590YjKv2GwSXc+4Prx6Ek=; b=lG9lX6DRDOIuWhoYA+XTO/stX0YVvgh0GhR3QlKRXzOa8wt1Pc18LjstG61RF2jgbp +6Q44yIF2WSQ8XGr+KPnj+e74lJ6LwlLnKTXmmqKMy9RFl/j3C8l6Uaw3FXlghiMScJD 8r/dVfcbc5X0f3dJ7cscWYZxqU5RtrsDc8emQdhULgYe8snImwr6iYFXwereuJIXWs3b /108sMBciBdML2i8uZkYDYZCBiPBeM0E00fUyrM0069yAsS/S47qkFsalFGh+7Ri//Bf mpAH2DKqxXd6UOjuICN2MtrmPBNFwUm3F0lwhrkLdylLk7jQBVoG9MgYyPGaxsvbra56 8UGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=P8FfOKvdGDgngebQW0D142590YjKv2GwSXc+4Prx6Ek=; b=itPa8gals+Hf/5ZxrmewFIyKQHVzifhK/TKxjX0oYG3oYax6CEh3cW8dTI4j4z897R HuJvLMcH89N2jBhE2nTSYSj8o42DqS0YTMjn6EIUlo5hoMcmaUOoFwyE3w9Fw42eG3Qq PvfWlTVJYhIGY3idtDmib2ghpUcGCCAHMLJIbOY40Vli8q7FKJBYjUQeN1fGrGxkX0wh XDvH1zcHdqR45DaEATv8zSxuJztqqaqj852hdRNU5cZuS22yzQhnzNn2kzBlqqA9gjnH Fkizp0sHXcGEHRJWEcnmny9NszEzuNT8a128k9KPKjq1DJFZRCD04B5JqOm8Pzp8Ps8o eEPQ== X-Gm-Message-State: AGi0PuYrsjhOmGQPfmV4f7a1uLsTro2qN94Lk8LIhmJO6y9ayt9f3IDv KgeVSKTsEaMpdaXNXXwyqEzHHQ== X-Google-Smtp-Source: APiQypLkq4F9qF0JALz1bzMpCphKkEDgELBfXfamab96NVkkoY6fivhDOaCEJ9nK2Zjsnasar2r4XQ== X-Received: by 2002:adf:cd04:: with SMTP id w4mr39931402wrm.357.1588150256145; Wed, 29 Apr 2020 01:50:56 -0700 (PDT) Received: from localhost.localdomain (217-149-174-60.nat.highway.telekom.at. [217.149.174.60]) by smtp.gmail.com with ESMTPSA id a67sm7101352wmc.30.2020.04.29.01.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 01:50:55 -0700 (PDT) Message-ID: Subject: Re: NUMA settings From: Laurenz Albe To: Marc =?ISO-8859-1?Q?Recht=E9?= , pgsql-performance@lists.postgresql.org Date: Wed, 29 Apr 2020 10:50:54 +0200 In-Reply-To: <2d10f8ab-5fc6-a0a5-facf-68f35de95ea9@rechte.fr> References: <2d10f8ab-5fc6-a0a5-facf-68f35de95ea9@rechte.fr> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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