diff --git a/inventory/host_vars/db-arm-koji01.qa.fedoraproject.org b/inventory/host_vars/db-arm-koji01.qa.fedoraproject.org index ba4b991b97..3aa1bf021c 100644 --- a/inventory/host_vars/db-arm-koji01.qa.fedoraproject.org +++ b/inventory/host_vars/db-arm-koji01.qa.fedoraproject.org @@ -40,4 +40,5 @@ nrpe_procs_warn: 600 nrpe_procs_crit: 700 host_backup_targets: ['/backups'] -shared_buffers: "4GB" +shared_buffers: "2GB" +effective_cache_size: "6GB" diff --git a/inventory/host_vars/db-datanommer02.phx2.fedoraproject.org b/inventory/host_vars/db-datanommer02.phx2.fedoraproject.org index 2c427e5c7d..ed55f8f22c 100644 --- a/inventory/host_vars/db-datanommer02.phx2.fedoraproject.org +++ b/inventory/host_vars/db-datanommer02.phx2.fedoraproject.org @@ -29,3 +29,4 @@ kernel_shmmax: 68719476736 host_backup_targets: ['/backups'] shared_buffers: "4GB" +effective_cache_size: "12GB" diff --git a/inventory/host_vars/db-fas01.phx2.fedoraproject.org b/inventory/host_vars/db-fas01.phx2.fedoraproject.org index 00b6fb1057..f2777a689e 100644 --- a/inventory/host_vars/db-fas01.phx2.fedoraproject.org +++ b/inventory/host_vars/db-fas01.phx2.fedoraproject.org @@ -55,4 +55,5 @@ nrpe_procs_warn: 400 nrpe_procs_crit: 500 host_backup_targets: ['/backups'] -shared_buffers: "32MB" +shared_buffers: "2GB" +effective_cache_size: "6GB" diff --git a/inventory/host_vars/db-fas01.stg.phx2.fedoraproject.org b/inventory/host_vars/db-fas01.stg.phx2.fedoraproject.org index 09a95043ef..b67fe110bd 100644 --- a/inventory/host_vars/db-fas01.stg.phx2.fedoraproject.org +++ b/inventory/host_vars/db-fas01.stg.phx2.fedoraproject.org @@ -36,4 +36,5 @@ nrpe_procs_warn: 400 nrpe_procs_crit: 500 host_backup_targets: ['/backups'] -shared_buffers: "32MB" +shared_buffers: "1GB" +effective_cache_size: "3GB" diff --git a/inventory/host_vars/db-koji01.phx2.fedoraproject.org b/inventory/host_vars/db-koji01.phx2.fedoraproject.org index 855a22069c..f4d1f635e8 100644 --- a/inventory/host_vars/db-koji01.phx2.fedoraproject.org +++ b/inventory/host_vars/db-koji01.phx2.fedoraproject.org @@ -40,3 +40,4 @@ nrpe_procs_crit: 700 host_backup_targets: ['/backups'] shared_buffers: "8GB" +effective_cache_size: "24GB" diff --git a/inventory/host_vars/db-qa01.qa.fedoraproject.org b/inventory/host_vars/db-qa01.qa.fedoraproject.org index a0c8899c13..bc62331a8d 100644 --- a/inventory/host_vars/db-qa01.qa.fedoraproject.org +++ b/inventory/host_vars/db-qa01.qa.fedoraproject.org @@ -43,4 +43,5 @@ fas_client_groups: sysadmin-qa,sysadmin-noc kernel_shmmax: 68719476736 host_backup_targets: ['/backups'] -shared_buffers: "4GB" +shared_buffers: "2GB" +effective_cache_size: "6GB" diff --git a/inventory/host_vars/db-s390-koji01.qa.fedoraproject.org b/inventory/host_vars/db-s390-koji01.qa.fedoraproject.org index e4b50868af..552030b6b7 100644 --- a/inventory/host_vars/db-s390-koji01.qa.fedoraproject.org +++ b/inventory/host_vars/db-s390-koji01.qa.fedoraproject.org @@ -40,4 +40,5 @@ nrpe_procs_warn: 600 nrpe_procs_crit: 700 host_backup_targets: ['/backups'] -shared_buffers: "4GB" +shared_buffers: "6GB" +effective_cache_size: "18GB" diff --git a/inventory/host_vars/db01.phx2.fedoraproject.org b/inventory/host_vars/db01.phx2.fedoraproject.org index ec300a2dcb..a3a4f8e811 100644 --- a/inventory/host_vars/db01.phx2.fedoraproject.org +++ b/inventory/host_vars/db01.phx2.fedoraproject.org @@ -76,5 +76,5 @@ nrpe_procs_warn: 800 nrpe_procs_crit: 900 host_backup_targets: ['/backups'] -shared_buffers: "1GB" - +shared_buffers: "4GB" +effective_cache_size: "12GB" diff --git a/inventory/host_vars/db01.stg.phx2.fedoraproject.org b/inventory/host_vars/db01.stg.phx2.fedoraproject.org index e44646efe5..a023488f58 100644 --- a/inventory/host_vars/db01.stg.phx2.fedoraproject.org +++ b/inventory/host_vars/db01.stg.phx2.fedoraproject.org @@ -43,4 +43,5 @@ custom_rules: [ '-A INPUT -p tcp -m tcp --dport 5432 -j ACCEPT' ] # nrpe_procs_warn: 800 nrpe_procs_crit: 900 -shared_buffers: "1GB" +shared_buffers: "4GB" +effective_cache_size: "12GB" diff --git a/roles/postgresql_server/templates/postgresql.conf b/roles/postgresql_server/templates/postgresql.conf index de9f1f0f57..9947805fbe 100644 --- a/roles/postgresql_server/templates/postgresql.conf +++ b/roles/postgresql_server/templates/postgresql.conf @@ -121,16 +121,8 @@ 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. -{% if ansible_hostname.startswith("db-koji01") %} work_mem = 4MB # min 64kB -maintenance_work_mem = 16MB # min 1MB -{% elif ansible_hostname.startswith("db01") %} -work_mem = 4MB # min 64kB -maintenance_work_mem = 1024MB # min 1MB -{% else %} -work_mem = 2MB # min 64kB maintenance_work_mem = 1024MB # min 1MB -{% endif %} #max_stack_depth = 2MB # min 100kB # - Free Space Map - @@ -223,13 +215,7 @@ 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 -{% elif ansible_hostname.startswith("db01") %} -effective_cache_size = 12GB -{% else %} -effective_cache_size = 5GB -{% endif %} +effective_cache_size = {{ effective_cache_size }} # - Genetic Query Optimizer -