Clean up postgresql template and move variables into host vars for each db host as they are memory dependent.

This commit is contained in:
Kevin Fenzi 2016-04-01 23:32:00 +00:00
parent da7de4ec0d
commit 4dad64e596
10 changed files with 17 additions and 23 deletions

View file

@ -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"

View file

@ -29,3 +29,4 @@ kernel_shmmax: 68719476736
host_backup_targets: ['/backups']
shared_buffers: "4GB"
effective_cache_size: "12GB"

View file

@ -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"

View file

@ -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"

View file

@ -40,3 +40,4 @@ nrpe_procs_crit: 700
host_backup_targets: ['/backups']
shared_buffers: "8GB"
effective_cache_size: "24GB"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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 -