Use OS huge pages for shared memory.
At a glance
| Property | Value |
|---|---|
| Parameter | huge_pages |
| Category | Memory |
| Default | try |
| Value type | boolean / enum / numeric |
| Change scope | Restart required |
What it does
Controls whether the server requests huge pages from the OS for its main shared-memory region. try uses them if available, on requires them, off disables.
How to apply a change
Requires a full server restart (postmaster context). Set it in postgresql.conf and restart PostgreSQL.
Inspect the current value and source with SHOW huge_pages; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'huge_pages';.
Tuning guidance
On Linux with large shared_buffers, reserve huge pages (vm.nr_hugepages) and set on to cut TLB misses and page-table overhead.