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: Id1cd254fb758a09c07b7b56ba735b00b94d7a040
This commit is contained in:
Dmitriy Rabotyagov
2020-11-30 13:52:38 +02:00
parent 87a2549a7b
commit 246db283d9

View File

@@ -374,7 +374,7 @@ nova_rbd_inuse: "{{ (nova_libvirt_images_rbd_pool | bool) or (nova_cinder_rbd_in
## Cap the maximun number of threads / workers when a user value is unspecified.
nova_api_threads_max: 16
nova_api_threads: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, nova_api_threads_max] | min }}"
nova_api_threads: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, nova_api_threads_max] | min }}"
## Policy vars
# Provide a list of access controls to update the default policy.json with. These changes will be merged