From bfda45cc160fe38f066d22ba4c286dc212c7e1ad Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 30 Oct 2020 18:36:48 +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: I40c292b7ba2f48a02ffe4c45d984ea7af6460f62 --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 2cea2da..268e070 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -163,7 +163,7 @@ manila_service_data_program_enabled: false ## Cap the maximun number of threads / workers when a user value is unspecified. manila_osapi_share_workers_max: 16 -manila_osapi_share_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, manila_osapi_share_workers_max] | min }}" +manila_osapi_share_workers: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, manila_osapi_share_workers_max] | min }}" ## Manila RPC manila_rpc_executor_thread_pool_size: 64