huge_pages
Requires a restarttuned by pgconfiguratorenum: try / on / off
Whether to back shared memory with OS huge pages (reduces TLB pressure).
What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded
What it does
huge_pages controls whether PostgreSQL requests large memory pages from the OS for its shared memory (mainly shared_buffers). Huge pages reduce the CPU's address-translation overhead (fewer TLB misses) and page-table memory, which helps most when shared_buffers is large.
How to tune it
The default 'try' uses huge pages if the OS has them and silently falls back otherwise. For large-RAM servers, pre-allocate huge pages at the OS level and set 'on' to guarantee they're used (with 'on', PostgreSQL refuses to start if they aren't available — a deliberate safety check). Negligible benefit on small instances.
FAQ
- What's the difference between huge_pages = try and on?
- 'try' uses huge pages when available and falls back to normal pages otherwise — safe but unverifiable. 'on' requires them: PostgreSQL won't start without enough huge pages reserved, so you know they're really in use.