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
This commit is contained in:
Ravi Gummadi 2017-02-23 05:14:54 -05:00
parent be40758abd
commit 4253b61abf
2 changed files with 9 additions and 1 deletions

View File

@ -182,7 +182,9 @@ keystone_apache_custom_log_format: combined
keystone_apache_servertokens: "Prod" keystone_apache_servertokens: "Prod"
keystone_apache_serversignature: "Off" keystone_apache_serversignature: "Off"
keystone_wsgi_threads: 1 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 ## Apache MPM tunables
keystone_httpd_mpm_backend: event keystone_httpd_mpm_backend: event

View File

@ -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.