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 1pJNu6-0005eH-9f for pgsql-bugs@arkaria.postgresql.org; Sun, 22 Jan 2023 00:08:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pJNu4-0004TM-RR for pgsql-bugs@arkaria.postgresql.org; Sun, 22 Jan 2023 00:08:08 +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 1pJNu4-0004TD-JS for pgsql-bugs@lists.postgresql.org; Sun, 22 Jan 2023 00:08:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJNu2-0000Ac-Hr for pgsql-bugs@lists.postgresql.org; Sun, 22 Jan 2023 00:08:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30M081751116927; Sat, 21 Jan 2023 19:08:01 -0500 From: Tom Lane To: Andres Freund cc: Tomas Vondra , david_sisson@dell.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes In-reply-to: <20230121234501.b7b2skgbdw73ujvh@awork3.anarazel.de> References: <17757-dbdfc1f1c954a6db@postgresql.org> <4ce40288-5b88-f9fb-ea11-fc932c61472b@enterprisedb.com> <20230121232922.juo7t3fhaso7qh3s@awork3.anarazel.de> <1113361.1674343983@sss.pgh.pa.us> <20230121234501.b7b2skgbdw73ujvh@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 21 Jan 2023 15:45:01 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1116925.1674346081.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 21 Jan 2023 19:08:01 -0500 Message-ID: <1116926.1674346081@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > Perhaps we should add an option to force MAP_POPULATE being used? I'm fa= irly > certain that'd avoid the SIGBUS in this case. And it'd make sense to ens= ure > that we can actually use the memory in initdb. > Unfortunately it's not unproblematic to use it in general, because with = large > shared_buffers values it can be quite slow, because the kernel initializ= es the > memory in a single thread. I've seen ~3GB/s on multi-socket machines. Hmm ... but if we can't use it by default, we're still back to the problem of needing a way to tell initdb to do things differently. I'd just as soon keep that to "set huge_pages =3D off" rather than inventing whole new things. regards, tom lane