mirror of
https://gitea.0xace.cc/ansible-galaxy/patroni.git
synced 2024-11-24 23:56:39 +00:00
fix autotuning
This commit is contained in:
parent
adab430df7
commit
6f18db44d2
@ -122,9 +122,9 @@ patroni_postgresql_default_parameters:
|
|||||||
shared_buffers: "{{ (ansible_memory_mb.real.total * 0.25) | round | int }}MB"
|
shared_buffers: "{{ (ansible_memory_mb.real.total * 0.25) | round | int }}MB"
|
||||||
max_worker_processes: "{{ ansible_processor_vcpus }}"
|
max_worker_processes: "{{ ansible_processor_vcpus }}"
|
||||||
max_parallel_workers: "{{ ansible_processor_vcpus }}"
|
max_parallel_workers: "{{ ansible_processor_vcpus }}"
|
||||||
max_parallel_workers_per_gather: "{{ (ansible_processor_vcpus / 2) | round | int }}"
|
max_parallel_workers_per_gather: "{{ ((ansible_processor_vcpus / 2) | round | int) if ansible_processor_vcpus > 1 else ansible_processor_vcpus }}"
|
||||||
max_parallel_maintenance_workers: "{{ (ansible_processor_vcpus / 2) | round | int }}"
|
max_parallel_maintenance_workers: "{{ ((ansible_processor_vcpus / 2) | round | int) if ansible_processor_vcpus > 1 else ansible_processor_vcpus }}"
|
||||||
work_mem: "{{ (((ansible_memory_mb.real.total - ((ansible_memory_mb.real.total * 0.25) | round | int)) / (patroni_postgresql_max_connections | int * 3) / ((ansible_processor_vcpus / 2) | round | int)) + 4) | round | int }}MB"
|
work_mem: "{{ (((ansible_memory_mb.real.total - ((ansible_memory_mb.real.total * 0.25) | round | int)) / (patroni_postgresql_max_connections | int * 3) / (((ansible_processor_vcpus / 2) | round | int) if ansible_processor_vcpus > 1 else ansible_processor_vcpus)) + 4) | round | int }}MB"
|
||||||
maintenance_work_mem: "{{ (ansible_memory_mb.real.total * 0.0625) | round | int }}MB"
|
maintenance_work_mem: "{{ (ansible_memory_mb.real.total * 0.0625) | round | int }}MB"
|
||||||
effective_cache_size: "{{ (ansible_memory_mb.real.total * 0.8) | round | int }}MB"
|
effective_cache_size: "{{ (ansible_memory_mb.real.total * 0.8) | round | int }}MB"
|
||||||
checkpoint_timeout: "15min"
|
checkpoint_timeout: "15min"
|
||||||
|
Loading…
Reference in New Issue
Block a user