postgresql: dynamic memory configuration
This commit is contained in:
parent
27e9eaba55
commit
283953a69f
2 changed files with 4 additions and 2 deletions
|
@ -3,10 +3,10 @@
|
|||
postgresql_databases: []
|
||||
|
||||
# Tuning
|
||||
postgresql_shared_buffers: 4GB
|
||||
postgresql_shared_buffers: "{{ (ansible_memtotal_mb * 0.25) | int }}MB"
|
||||
postgresql_work_mem: 8MB
|
||||
postgresql_random_page_cost: 1.5
|
||||
postgresql_effective_cache_size: 14GB
|
||||
postgresql_effective_cache_size: "{{ (ansible_memtotal_mb * 0.5) | int }}MB"
|
||||
|
||||
# PostgreSQL version
|
||||
postgresql_version: '9.4'
|
||||
|
|
|
@ -21,3 +21,5 @@
|
|||
group: postgres
|
||||
mode: "0644"
|
||||
notify: restart postgresql
|
||||
|
||||
- meta: flush_handlers
|
||||
|
|
Loading…
Add table
Reference in a new issue