From 6856c22cb6d55bbb1810a0679a0378f49280e25c Mon Sep 17 00:00:00 2001 From: Andrew Bonney Date: Tue, 12 Jan 2021 11:24:46 +0000 Subject: [PATCH] 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 --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 98c5aaf..54f48d3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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