Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vlQFJ-00BhSm-2h for pgsql-admin@arkaria.postgresql.org; Thu, 29 Jan 2026 11:31:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vlQFJ-00869G-01 for pgsql-admin@arkaria.postgresql.org; Thu, 29 Jan 2026 11:31:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vlQFI-00868w-24 for pgsql-admin@lists.postgresql.org; Thu, 29 Jan 2026 11:31:32 +0000 Received: from mail-vs1-xe30.google.com ([2607:f8b0:4864:20::e30]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vlQFG-002uGZ-0q for pgsql-admin@lists.postgresql.org; Thu, 29 Jan 2026 11:31:32 +0000 Received: by mail-vs1-xe30.google.com with SMTP id ada2fe7eead31-5f52e500e89so693041137.0 for ; Thu, 29 Jan 2026 03:31:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769686290; cv=none; d=google.com; s=arc-20240605; b=Y/yPSUw6wouoCQisiQweZoYKBK4ePi5SebTfPBdpbqdmxbHOFpwkv/9mSWxqTeSnCe Az5lvpRmCAfQm/tLFfv8SyYYKQ2gVJx5bbjZ66qIRkWFPXUJSuNoi/NC7wcr/U2LKsjL 8GszLrDZltCpMJjsviUHHtpY5Y4RMtJ7hj7egXba10qA4UpctnGgeLIsfr2HYaGbFwVR glG9g2txdGWuSwOR35jeuT+3fqb0AXtnBA6DZ41lDeJWlItdolzeW2298v2AsIVeHbft kxbSit/JL/zmtksG+lVnpQHNDejqoFW40biwl3NvE3dfcHFe4oHNxEk7PgMSRF6zyGIB 3EsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=wiVtw4q9B5mV0W+tbH2BOlEHSpuKpAr3JTxPE/Rxl04=; fh=aqzVXtH4ynFrvvSk0xL6yybqMmVBvkwSNBVebLSqiGM=; b=HdQKxFALB1luGX/LOkbsFeMEQKAjPciCaeojFI6u+afSQUS2UjitVxntUlAeV1wIQI Wq4NNpF1dXS5YqvkVYSlHdkON0rOfXLgMeLuFqfOL/H8Q0dPbH1iudyTzHFT2P14C7zN q84aQk0aP3NY+ZiFo7LxWdkh88TbH85dkKW8nKBYt6hZKkcK7fbWYfNy6N3d3z8mNmBQ 5ja5OzvfeHTFp5ObJzLgYnrWe/taOJknl3Umn0jvRAnPsP1T0tQv9cR1YZIwTilBrXoI 9t23TMH/daPN0KBRTuVwN4Z+xn7pnjJgm78hMacnPG3EWfPlycM6Dj0DOa/ljmcAnkbE vERg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769686290; x=1770291090; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wiVtw4q9B5mV0W+tbH2BOlEHSpuKpAr3JTxPE/Rxl04=; b=D+CSBQHpd0Br2h/7q4ubg1SPSavsxWChERqzfzu3ivF5URyR3Xk5X03Z43NGcrYmxW 1ZSKhHE5opgPex//tzG0bYYBBy/6koIokWe5UcNWEbhLGzBAMOxvQe20mIjn2jzDpAO8 sqwuRiL2BEKUuoaOxTjyUPbggwgjWUPYAmYBCKLk7i6hwvGK7r6aXwRrqov+QY9mAleq lyLD2MQ2I2mRCBM7A1WgxGw+Xwjz7GZevEvdyZ/5C9z5z8m6pZQ6djU0A1SIbZxuz6jp 8g/ZFyfP568sR5ftYOPTsra3+xtCCc1I1WsAhWTZXwLyIp0MCnSc7WwqHP05U0Xe+tqL LgrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769686290; x=1770291090; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wiVtw4q9B5mV0W+tbH2BOlEHSpuKpAr3JTxPE/Rxl04=; b=ZSgtNMvQd9FTWM1Jx6WAiMp6Q21jwsucI1nlV8mRuKWUCV+crnrD3M4oQDvyWwyxnj 3nRaRzCyJkV50iyTWEEVRrJIHpCiqRnI7ICpfhG23Mw5FquHWWOVr/W2yHYmqaSlH564 WJfCkijuytczgptJkHbhvb2/y8ynJ42zjGXIcvceGPJ7R//2Q4+zunzc0pB2qgw9xRbK vYWeH5p11ZrrVOgpSbmpAs1VAJoYeSLgTCmunVa4i/d8tw3+NDAXtcy2e2dSH9o0g39s +YJChwmP+kX6inrtnNHg9pZPQGndfEBnmdNJdLlDpc/Cn+rhQTSGVfS+VQcOsKaLZMuA /yKA== X-Forwarded-Encrypted: i=1; AJvYcCWCf1xKR8Jzn4g+KrLneYqU95547K4mSfDkRM96OOAY3F5Up9RPRzEQs8BdZfrWGudY28tQNg6fkMIVIg==@lists.postgresql.org X-Gm-Message-State: AOJu0YwVzWvXAXYkBm0RKKM6PiueFlzqG6+1cFFGCrKXEdNXW3sM90eW yN+Gez8tK5PTh8zA17wO/uEXMLMqqkxaSpo5EeO1E97cu0AC6So2r7U2FgH6PQR8FERq/6PxLTf D8ZhhEobbtJAU6clBw0fWvjFZita9mPc= X-Gm-Gg: AZuq6aInX2Jg1Bi4Fj0VwGGHS9gxfgo3HouhcGBxoEvs7GXFwIVPHsIQPw9MHVGk1YB gtsrxOK9CVDcJtWB0zPV9ViJ7H6i033rQMT/22gSlSN65GoSarHIXw+IWq3Ttddo85WurgFF61P ggUGQeersbNT9L8BMaNnW+NMCiRUyJG6L/whMVV2ufDw6lfu2j56RL7aJ7t+FxkCPqenLldlUXg VMHLI1jGhHCyuJ9af6vjNfg6BZuyjQPrOryFn1N7QtEZMbjsFs2s3u5YwoitkBgSyrQvpk= X-Received: by 2002:a05:6102:6cd:b0:5ef:8ae:85a5 with SMTP id ada2fe7eead31-5f7236bd635mr3157514137.16.1769686290049; Thu, 29 Jan 2026 03:31:30 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Roland_M=C3=BCller?= Date: Thu, 29 Jan 2026 13:31:17 +0200 X-Gm-Features: AZwV_QjcI1dzLJawMbVTTMcnkLmPSbzGrAugMp9EZN8DY0_N3_AZOKubOzfQbH8 Message-ID: Subject: Re: Setting huge_pages=off when HugePages are allocated in Linux? To: Laurenz Albe Cc: Ron Johnson , Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000aeafa606498532cb" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000aeafa606498532cb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable When does it make sense to use hugepages in Postgresql? Is usage of hugepages only available in release 18? Laurenz Albe ezt =C3=ADrta (id=C5=91pont: 2026. = jan. 28., Sze 19:02): > On Wed, 2026-01-28 at 10:31 -0500, Ron Johnson wrote: > > In the example in this (quite helpful) Cybertec post, 10475 HugePages > are allocated. > > https://www.cybertec-postgresql.com/en/huge-pages-postgresql/ > > > > If we set "huge_pages =3D off" within PG and then restart PG, will Linu= x > see those 10475 HugePages as off-limits to normal 4KiB allocations? > > Yes. That's why it is a good idea to set "huge_pages =3D on" if you inte= nd > to use them with > PostgreSQL. Otherwise it may happen that PostgreSQL resorts to allocatin= g > shared buffers > using normal memory, and your huge pages just sit around and are wasted. > > Yours, > Laurenz Albe > > > --000000000000aeafa606498532cb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When does it make sense to use hugepages in Postgresql?= =C2=A0

Is usage of hugepages o= nly available in release 18?

Laurenz Albe <laurenz.albe@cybertec.at> = ezt =C3=ADrta (id=C5=91pont: 2026. jan. 28., Sze 19:02):
On Wed, 2026-01-28 at 10:31 -0500,= Ron Johnson wrote:
> In the example in this (quite helpful) Cybertec post,=C2=A010475 HugeP= ages are allocated.=C2=A0
> https://www.cybertec-po= stgresql.com/en/huge-pages-postgresql/
>
> If we set "huge_pages =3D off" within PG and then restart PG= , will Linux see those 10475 HugePages as off-limits to normal 4KiB allocat= ions?

Yes.=C2=A0 That's why it is a good idea to set "huge_pages =3D on&= quot; if you intend to use them with
PostgreSQL.=C2=A0 Otherwise it may happen that PostgreSQL resorts to alloca= ting shared buffers
using normal memory, and your huge pages just sit around and are wasted.
Yours,
Laurenz Albe


--000000000000aeafa606498532cb--