Implement tunable heat api and engine worker overrides

This patch introduces an override for the number of Heat engine and
Heat API workers:
 - heat_engine_workers
 - heat_api_workers

The values may be set in /etc/openstack_deploy/user_variables.yml
and if they are unset, half the number of available vCPU's will be
used instead.

Implements: blueprint gate-split
Change-Id: I1ecb4951fe8336d9ef86ef9d5c8c21105a299096
This commit is contained in:
Jesse Pretorius 2015-11-25 19:47:02 +00:00
parent 962229e839
commit 7d8105ed55
2 changed files with 10 additions and 0 deletions

View File

@ -146,6 +146,10 @@ heat_watch_port: 8003
heat_watch_server_uri: "{{ heat_watch_proto }}://{{ external_lb_vip_address }}:{{ heat_watch_port }}"
heat_watch_server_url: "{{ heat_watch_server_uri }}"
# If the following variables are unset in user_variables, the value set will be half the number of available VCPUs
# heat_engine_workers: 4
# heat_api_workers: 4
## Plugin dirs
heat_plugin_dirs:
- /usr/lib/heat

View File

@ -1,5 +1,8 @@
# {{ ansible_managed }}
{% set _api_threads = ansible_processor_vcpus|default(2) // 2 %}
{% set api_threads = _api_threads if _api_threads > 0 else 1 %}
[DEFAULT]
verbose = {{ verbose }}
debug = {{ debug }}
@ -20,6 +23,8 @@ trusts_delegated_roles = {{ heat_trusts_delegated_roles | join(',') }}
auth_encryption_key = {{ heat_auth_encryption_key }}
num_engine_workers = {{ heat_engine_workers | default(api_threads) }}
## RPC Backend
rpc_backend = {{ heat_rpc_backend }}
@ -51,6 +56,7 @@ auth_uri = {{ keystone_service_internalurl }}
[heat_api]
bind_port = {{ heat_service_port }}
workers = {{ heat_api_workers | default(api_threads) }}
[heat_api_cfn]
bind_port = {{ heat_cfn_service_port }}