# Guidelines for PostgreSQL

### Suggested Parameters <a href="#suggested-parameters" id="suggested-parameters"></a>

When running a PostgreSQL optimization, consider starting from these recommendations:

<table><thead><tr><th width="323">Parameter</th><th>Recommendation</th></tr></thead><tbody><tr><td><code>pg_max_connections</code></td><td>Keep its value under 1000 connections.</td></tr><tr><td><code>pg_effective_cache_size</code></td><td>75% of physical available memory to PostgreSQL.</td></tr><tr><td><code>pg_maintenance_work_mem</code></td><td>12% of physical available memory to PostgreSQL.</td></tr><tr><td><code>pg_max_wal_senders</code></td><td>Max replicas you expect to have, doubled.</td></tr><tr><td><code>pg_max_parallel_workers</code></td><td>Number of cores divided by 2.</td></tr><tr><td><code>pg_shared_buffers</code></td><td>25% of physical available memory to PostgreSQL.</td></tr></tbody></table>

&#x20;
