mirror of
https://github.com/status-im/infra-status.git
synced 2025-01-12 06:54:40 +00:00
store-db: applying postgres system setting based on the stage
Signed-off-by: Alexis Pentori <alexis@status.im>
This commit is contained in:
parent
f85fc71b50
commit
af9162fc2e
@ -25,31 +25,36 @@ postgres_ha_databases:
|
||||
pass: '{{lookup("bitwarden", "fleets/status/"+stage+"/db/nim-waku")}}'
|
||||
|
||||
# Avoid exceeding volume size with WAL log.
|
||||
postgres_ha_alter_system_settings:
|
||||
postgres_ha_alter_system_settings: '{{ postgres_system_setting_default | combine(postgres_system_setting_stage[stage])}}'
|
||||
|
||||
postgres_system_setting_default:
|
||||
checkpoint_timeout: '5min'
|
||||
max_wal_size: '1GB'
|
||||
min_wal_size: '80MB'
|
||||
max_locks_per_transaction: '2160'
|
||||
autovacuum_work_mem: '{{ ((ansible_memtotal_mb * 0.1) * 1000) | int }}' # kB
|
||||
|
||||
postgres_system_setting_stage:
|
||||
staging: {}
|
||||
prod:
|
||||
## The following are obtained from https://pgtune.leopard.in.ua/ (8GB RAM 4CPUs SSD PG version 15)
|
||||
max_connections: '300'
|
||||
shared_buffers: '2GB'
|
||||
effective_cache_size: '6GB'
|
||||
maintenance_work_mem: '512MB'
|
||||
checkpoint_completion_target: '0.9'
|
||||
wal_buffers: '16MB'
|
||||
default_statistics_target: '100'
|
||||
random_page_cost: '1.1'
|
||||
effective_io_concurrency: '200'
|
||||
work_mem: '3495kB'
|
||||
huge_pages: 'off'
|
||||
min_wal_size: '2GB'
|
||||
max_wal_size: '8GB'
|
||||
max_worker_processes: '4'
|
||||
max_parallel_workers_per_gather: '2'
|
||||
max_parallel_workers: '4'
|
||||
max_parallel_maintenance_workers: '2'
|
||||
max_connections: '300'
|
||||
shared_buffers: '2GB'
|
||||
effective_cache_size: '6GB'
|
||||
maintenance_work_mem: '512MB'
|
||||
checkpoint_completion_target: '0.9'
|
||||
wal_buffers: '16MB'
|
||||
default_statistics_target: '100'
|
||||
random_page_cost: '1.1'
|
||||
effective_io_concurrency: '200'
|
||||
work_mem: '3495kB'
|
||||
huge_pages: 'off'
|
||||
min_wal_size: '2GB'
|
||||
max_wal_size: '8GB'
|
||||
max_worker_processes: '4'
|
||||
max_parallel_workers_per_gather: '2'
|
||||
max_parallel_workers: '4'
|
||||
max_parallel_maintenance_workers: '2'
|
||||
|
||||
# Open PostgreSQL Port
|
||||
open_ports_default_comment: '{{ postgres_ha_service_name }}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user