This is an example run of the pgtune
script, which examines a system's
hardware and proposes changes to PostgreSQL configuration, to better
utilize the capabilities of the hardware for the benefit of the database.
The following configuration differences are from an example of a VM running with 2x Intel Quad @2.33GHz CPUs and 2GB of RAM. The commands run to create the new configuration file with pgtune were:
pgtune -i /var/lib/pgsql/9.2/data/postgresql.conf -o /var/lib/pgsql/9.2/data/postgresql2.conf
mv postgresql.conf postgresql-factory-default.conf
mv postgresql2.conf postgresql.conf
chown postgres:postgres postgresql.conf
service postgresql restart
Differences
< max_connections = 100
> max_connections = 80
< #default_statistics_target = 100
> default_statistics_target = 50
< #constraint_exclusion = partition
> constraint_exclusion = on
< #effective_cache_size = 128MB
> effective_cache_size = 1408MB
< #wal_buffers = -1
> wal_buffers = 8MB