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 divide amount of CPUs to number of threads for hyperthreaded CPUs

Change-Id: I67a874a94e7ef5793f484599f92cd81f20f42df3
This commit is contained in:
Andrew Bonney 2021-01-12 11:24:46 +00:00
parent 29a7510b18
commit 6856c22cb6
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ zun_recreate_keys: False
## Cap the maximun number of threads / workers when a user value is unspecified.
zun_api_threads_max: 16
zun_api_threads: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, zun_api_threads_max] | min }}"
zun_api_threads: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, zun_api_threads_max] | min }}"
zun_service_in_ldap: false