From bf42c4a4038d7743df5134f41f803f26c3cdbd90 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 30 Nov 2020 14:20:14 +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: I1dbbfc82f24732f8534594ff25aefc03e5c4003c --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 76885d9..bd03112 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -63,7 +63,7 @@ placement_service_port: 8780 # UWSGI placement_wsgi_processes_max: 16 -placement_wsgi_processes: "{{ [[ansible_processor_vcpus|default(1), 1] | max * 2, placement_wsgi_processes_max] | min }}" +placement_wsgi_processes: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, placement_wsgi_processes_max] | min }}" placement_wsgi_threads: 1 ## Service Type and Data