diff --git a/inventory/host_vars/db-koji01.phx2.fedoraproject.org b/inventory/host_vars/db-koji01.phx2.fedoraproject.org index 41f3677fc2..855a22069c 100644 --- a/inventory/host_vars/db-koji01.phx2.fedoraproject.org +++ b/inventory/host_vars/db-koji01.phx2.fedoraproject.org @@ -39,4 +39,4 @@ nrpe_procs_warn: 600 nrpe_procs_crit: 700 host_backup_targets: ['/backups'] -shared_buffers: "4GB" +shared_buffers: "8GB" diff --git a/roles/postgresql_server/templates/postgresql.conf b/roles/postgresql_server/templates/postgresql.conf index 603f9ea610..4a8bdfb747 100644 --- a/roles/postgresql_server/templates/postgresql.conf +++ b/roles/postgresql_server/templates/postgresql.conf @@ -121,8 +121,13 @@ shared_buffers = {{ shared_buffers }} # min 128kB or max_connections*16kB # 8 MB is probably on the high side. We can probably do with 4MB. But we # were seeing a problem and we have the RAM so we're going to try this. -work_mem = 2MB # min 64kB -maintenance_work_mem = 1024MB # min 1MB +{% if ansible_hostname.startswith("db-koji01") %} +work_mem = 4MB # min 64kB +maintenance_work_mem = 16MB # min 1MB +{% else %} +work_mem = 2MB # min 64kB +maintenance_work_mem = 1024MB # min 1MB +{% endif %} #max_stack_depth = 2MB # min 100kB # - Free Space Map - @@ -215,7 +220,11 @@ random_page_cost = 3.0 # same scale as above #cpu_tuple_cost = 0.01 # same scale as above #cpu_index_tuple_cost = 0.005 # same scale as above #cpu_operator_cost = 0.0025 # same scale as above +{% if ansible_hostname.startswith("db-koji01") %} +effective_cache_size = 24GB +{% else %} effective_cache_size = 5GB +{% endif %} # - Genetic Query Optimizer -