diff --git a/playbooks/roles/os_heat/defaults/main.yml b/playbooks/roles/os_heat/defaults/main.yml index 8fb16385b6..6c60098af1 100644 --- a/playbooks/roles/os_heat/defaults/main.yml +++ b/playbooks/roles/os_heat/defaults/main.yml @@ -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 diff --git a/playbooks/roles/os_heat/templates/heat.conf.j2 b/playbooks/roles/os_heat/templates/heat.conf.j2 index ffb1e68043..a6d9a2c393 100644 --- a/playbooks/roles/os_heat/templates/heat.conf.j2 +++ b/playbooks/roles/os_heat/templates/heat.conf.j2 @@ -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 }}