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

From Roland Müller
Subject Re: Setting huge_pages=off when HugePages are allocated in Linux?
Date
Msg-id CA+8p0G2TAVw7+h2s60cPe3K9=YWPWjm+sf4a_aJOb=kC-E6BDQ@mail.gmail.com
Whole thread
In response to Re: Setting huge_pages=off when HugePages are allocated in Linux?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Setting huge_pages=off when HugePages are allocated in Linux?
List pgsql-admin
When does it make sense to use hugepages in Postgresql? 

Is usage of hugepages only available in release 18?

Laurenz Albe <laurenz.albe@cybertec.at> ezt írta (időpont: 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 = off" within PG and then restart PG, will Linux see those 10475 HugePages as off-limits to normal 4KiB 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: Tim Herren
Date:
Subject: Re: Maximum amount of pg_locks
Next
From: Alicja Kucharczyk
Date:
Subject: Re: Setting huge_pages=off when HugePages are allocated in Linux?