Re: Setting huge_pages=off when HugePages are allocated in Linux? - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Setting huge_pages=off when HugePages are allocated in Linux?
Date
Msg-id a22c57a4b9cd72edbd210574018eeb09e3cec9df.camel@cybertec.at
Whole thread Raw
In response to Setting huge_pages=off when HugePages are allocated in Linux?  (Ron Johnson <ronljohnsonjr@gmail.com>)
List pgsql-admin
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 = off" within PG and then restart PG, will Linux see those 10475 HugePages as off-limits to
normal4KiB allocations? 

Yes.  That's why it is a good idea to set "huge_pages = on" if you intend to use them with
PostgreSQL.  Otherwise it may happen that PostgreSQL resorts to allocating shared buffers
using normal memory, and your huge pages just sit around and are wasted.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Ron Johnson
Date:
Subject: Setting huge_pages=off when HugePages are allocated in Linux?
Next
From: Wasim Devale
Date:
Subject: Restoration process generates 1.2 TB of WAL files.