Re: Setting huge_pages=off when HugePages are allocated in Linux?

From: Roland Müller <rolmur(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Setting huge_pages=off when HugePages are allocated in Linux?
Date: 2026-01-29 11:31:17
Message-ID: CA+8p0G2TAVw7+h2s60cPe3K9=YWPWjm+sf4a_aJOb=kC-E6BDQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

When does it make sense to use hugepages in Postgresql?

Is usage of hugepages only available in release 18?

Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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
>
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alicja Kucharczyk 2026-01-29 14:57:47 Re: Setting huge_pages=off when HugePages are allocated in Linux?
Previous Message SASIKUMAR Devaraj 2026-01-29 10:09:05 Re: Sybase to postgres Timestamp column