Merge "Cap the number of worker threads"
This commit is contained in:
commit
7171ff9ca0
@ -125,6 +125,10 @@ horizon_disallow_iframe_embed: True
|
||||
# horizon_wsgi_processes: 4
|
||||
# horizon_wsgi_threads: 4
|
||||
|
||||
## Cap the maximun number of threads / workers when a user value is unspecified.
|
||||
horizon_wsgi_threads_max: 16
|
||||
horizon_wsgi_threads: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, horizon_wsgi_threads_max] | min }}"
|
||||
|
||||
## Horizon SSL
|
||||
horizon_ssl_cert: /etc/ssl/certs/horizon.pem
|
||||
horizon_ssl_key: /etc/ssl/private/horizon.key
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- Capping the default value for the variables
|
||||
``horizon_wsgi_processes`` and ``horizon_wsgi_threads`` to 16 when the
|
||||
user doesn't configure these variables. Default value is half the number
|
||||
of vCPUs available on the machine with a capping value of 16.
|
@ -1,8 +1,5 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% set _wsgi_threads = ansible_processor_vcpus | default(2) // 2 %}
|
||||
{% set wsgi_threads = _wsgi_threads if _wsgi_threads > 0 else 1 %}
|
||||
|
||||
{% if not horizon_external_ssl | bool %}
|
||||
<VirtualHost *:80>
|
||||
ServerName {{ horizon_server_name }}
|
||||
@ -36,7 +33,7 @@
|
||||
{% endif %}
|
||||
|
||||
WSGIScriptAlias / {{ horizon_lib_wsgi_file }}
|
||||
WSGIDaemonProcess horizon user={{ horizon_system_user_name }} group={{ horizon_system_group_name }} processes={{ horizon_wsgi_processes | default(wsgi_threads) }} threads={{ horizon_wsgi_threads | default(wsgi_threads) }} python-path={{ horizon_bin | dirname }}/lib/python2.7/site-packages
|
||||
WSGIDaemonProcess horizon user={{ horizon_system_user_name }} group={{ horizon_system_group_name }} processes={{ horizon_wsgi_processes | default(horizon_wsgi_threads) }} threads={{ horizon_wsgi_threads }} python-path={{ horizon_bin | dirname }}/lib/python2.7/site-packages
|
||||
|
||||
WSGIProcessGroup horizon
|
||||
WSGIApplicationGroup horizon
|
||||
|
Loading…
x
Reference in New Issue
Block a user