Reduce number of processes on small systems

Even the most modest 4C/8T system would run with the maximum 16 processes
due to the calculation being VCPU*2.

We devide amount of CPUs to number of threads for hyperthreaded CPUs

Change-Id: Ie3c590d413b001ac9ccdb6522c9654b4372b5e10
This commit is contained in:
Dmitriy Rabotyagov 2020-11-30 14:01:40 +02:00
parent b5c7fe3c3f
commit 5e4c9582f1

View File

@ -225,7 +225,7 @@ swift_oslomsg_notify_vhost: /swift
# value at 16 if the swift proxy is in a container and user did not define # value at 16 if the swift proxy is in a container and user did not define
# this variable. # this variable.
swift_proxy_server_workers_max: 16 swift_proxy_server_workers_max: 16
swift_proxy_server_workers_not_capped: "{{ [ansible_processor_vcpus|default(2) // 2, 1] | max }}" swift_proxy_server_workers_not_capped: "{{ [(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2 }}"
swift_proxy_server_workers_capped: "{{ [swift_proxy_server_workers_max, swift_proxy_server_workers_not_capped|int] | min }}" swift_proxy_server_workers_capped: "{{ [swift_proxy_server_workers_max, swift_proxy_server_workers_not_capped|int] | min }}"
swift_proxy_server_workers: "{{ (inventory_hostname == physical_host) | ternary(swift_proxy_server_workers_not_capped, swift_proxy_server_workers_capped) }}" swift_proxy_server_workers: "{{ (inventory_hostname == physical_host) | ternary(swift_proxy_server_workers_not_capped, swift_proxy_server_workers_capped) }}"