Tune sentry postgres in GCP

The sentry postgres database is about 400GB in size. Machine specs in GCP is n1-standard-16 (16 vCPUs, 60 GB memory).

The current configuration looks like this:

archive_command = '/usr/bin/envdir /etc/wal-e.d/env /opt/wal-e/bin/wal-e wal-push %p'
archive_mode = 'on'
data_directory = '/var/lib/postgresql/9.5/main'
datestyle = 'iso, mdy'
default_text_search_config = 'pg_catalog.english'
external_pid_file = '/var/run/postgresql/9.5-main.pid'
hba_file = '/etc/postgresql/9.5/main/pg_hba.conf'
ident_file = '/etc/postgresql/9.5/main/pg_ident.conf'
listen_addresses = 'localhost'
log_line_prefix = '%t '
max_connections = 100
port = 5432
shared_buffers = '24MB'
ssl = on
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
unix_socket_directories = '/var/run/postgresql'
wal_level = 'hot_standby'

Considering the size of the database, it makes sense to tune the settings a little to avoid running into issues (I'm not aware of any, but this is likely to degrade performance - my one-off queries to look at some data were really slow).

As a quick change, we can change only these (based on standard recommendations).

shared_buffers = '16GB'
effective_cache_size = '32GB'
work_mem='16MB'
Edited Sep 10, 2018 by Andreas Brandl
Assignee Loading
Time tracking Loading