Why use pgtune
- Config for your hardware. Enter RAM, CPU, storage and workload profile to get
shared_buffers,work_mem, WAL and parallelism settings. - PostgreSQL 14–19. Parameters follow the selected version — for example
io_methodfor 18+,wal_compressionand vacuum options. - Explanations and warnings. Every parameter has a short reason; the tool flags OOM risk, huge pages, LZ4, io_uring and settings that need a restart.
- Five profiles and storage types. Web, OLTP, data warehouse, desktop and mixed workloads; SSD, HDD, SAN and NVMe.
- Browser only. No server and no API — parameters never leave your device. Free, in 23 languages, with a shareable link.
How to tune PostgreSQL
- Choose the PostgreSQL version, operating system and workload profile.
- Enter total RAM and its unit, plus CPU cores and max connections if you know them.
- Select the storage type and whether the data is smaller than, about equal to, or larger than RAM.
- Press Generate, read the explanations and warnings, then copy the snippet into
postgresql.conf.
About the generated settings
The result is a starting point based on well-known heuristics for memory, WAL, the planner and parallelism. It does not replace load testing and monitoring on your own data.
Tips:
- Settings that need a restart are marked with a separate badge.
work_memapplies per operation, not per connection — a complex query can use it several times.- For many clients, use a pooler such as PgBouncer instead of raising
max_connections. - On Linux with
shared_buffersof 2 GB or more, enable huge pages. - After the change, check
EXPLAIN (ANALYZE, BUFFERS)andpg_stat_statements, change parameters in groups and keep the previous config.
What pgtune is for
- getting a sensible starting config for a new PostgreSQL server;
- recalculating settings after adding RAM or CPU or upgrading the major version;
- comparing profiles (web, OLTP, analytics) on the same hardware;
- explaining parameter choices in a review or runbook.
FAQ
Does pgtune send my parameters to a server?
No. All calculations run in your browser and there is no API.
Which PostgreSQL versions are supported?
14 to 19. The set of parameters and their values depends on the selected version.
Can I paste the result straight into production?
Treat it as a starting point. Review the warnings, apply it on a test instance and watch metrics under real load.
Why is max_connections low even for a large database?
Every connection costs memory and work_mem is divided among them. A pooler such as PgBouncer is usually better than thousands of direct connections.
What if I do not know the CPU count or connections?
Leave the fields empty: values are picked from the profile and RAM, and the assumed number of connections is shown in the result.