From 4253b61abf2c3beaae8c9bd4cb3ba402ad90a9d6 Mon Sep 17 00:00:00 2001 From: Ravi Gummadi Date: Thu, 23 Feb 2017 05:14:54 -0500 Subject: [PATCH] Cap the number of worker threads Users can configure the number of worker threads however when it's not specified the calculated number of workers can get too large on hosts with a large number of CPUs. Change-Id: I039993d28dbddbd43ffcb2a6f84785df475fefeb --- defaults/main.yml | 4 +++- .../notes/capping_keystone_workers-e284a47fc4dcea38.yaml | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/capping_keystone_workers-e284a47fc4dcea38.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 5f1b945d..d2dcce50 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -182,7 +182,9 @@ keystone_apache_custom_log_format: combined keystone_apache_servertokens: "Prod" keystone_apache_serversignature: "Off" keystone_wsgi_threads: 1 -keystone_wsgi_processes: "{{ (ansible_processor_vcpus | int > 0) | ternary (ansible_processor_vcpus, 1) * 2}}" +## Cap the maximun number of processes when a user value is unspecified. +keystone_wsgi_processes_max: 16 +keystone_wsgi_processes: "{{ [[ansible_processor_vcpus|default(1), 1] | max * 2, keystone_wsgi_processes_max] | min }}" ## Apache MPM tunables keystone_httpd_mpm_backend: event diff --git a/releasenotes/notes/capping_keystone_workers-e284a47fc4dcea38.yaml b/releasenotes/notes/capping_keystone_workers-e284a47fc4dcea38.yaml new file mode 100644 index 00000000..b3b84778 --- /dev/null +++ b/releasenotes/notes/capping_keystone_workers-e284a47fc4dcea38.yaml @@ -0,0 +1,6 @@ +--- +features: + - Capping the default value for the variable ``keystone_wsgi_processes`` + to 16 when the user doesn't configure this variable. Default value is + half the number of vCPUs available on the machine with a capping value + of 16.