From f37cb8868032b86fbc6aa843321c00b10441eafd Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 30 Nov 2020 14:03:47 +0200 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 devide amount of CPUs to number of threads for hyperthreaded CPUs Change-Id: I2ae9039871158f8a94e3f96694ddadea3005537b --- defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 78ee1a1..186b239 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -64,11 +64,11 @@ trove_profiler_enabled: false ## Cap the maximum number of threads / workers when a user value is unspecified. trove_api_workers_max: 16 -trove_api_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, trove_api_workers_max] | min }}" +trove_api_workers: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, trove_api_workers_max] | min }}" ## Cap the maximum number of threads / workers when a user value is unspecified. trove_conductor_workers_max: 16 -trove_conductor_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, trove_conductor_workers_max] | min }}" +trove_conductor_workers: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, trove_conductor_workers_max] | min }}" # Enable/Disable Ceilometer trove_ceilometer_enabled: False