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: I10a653dda7444b756fede74ce434b9038415c74c
This commit is contained in:
parent
f281a4844d
commit
bf6e06e666
@ -441,15 +441,16 @@ neutron_quota_vip: 10
|
|||||||
|
|
||||||
## General Neutron configuration
|
## General Neutron configuration
|
||||||
# If ``neutron_api_workers`` is unset the system will use half the number of available VCPUs to
|
# If ``neutron_api_workers`` is unset the system will use half the number of available VCPUs to
|
||||||
# compute the number of api workers to use.
|
# compute the number of api workers to use with a default capping value of 16.
|
||||||
# neutron_api_workers: 16
|
# neutron_api_workers: 16
|
||||||
|
|
||||||
# If ``neutron_metadata_workers`` is unset the system will use half the number of available VCPUs to
|
# If ``neutron_metadata_workers`` is unset the system will use half the number of available VCPUs to
|
||||||
# compute the number of api workers to use.
|
# compute the number of api workers to use with a default capping value of 16.
|
||||||
# neutron_metadata_workers: 16
|
# neutron_metadata_workers: 16
|
||||||
|
|
||||||
## Cap the maximun number of threads / workers when a user value is unspecified.
|
## Cap the maximun number of threads / workers when a user value is unspecified.
|
||||||
neutron_api_threads_max: 16
|
neutron_api_threads_max: 16
|
||||||
|
neutron_api_threads: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, neutron_api_threads_max] | min }}"
|
||||||
|
|
||||||
neutron_metadata_backlog: 4096
|
neutron_metadata_backlog: 4096
|
||||||
|
|
||||||
@ -534,8 +535,8 @@ neutron_dns_domain: openstacklocal
|
|||||||
neutron_dnsmasq_dns_servers: ""
|
neutron_dnsmasq_dns_servers: ""
|
||||||
# Limit number of leases to prevent a denial-of-service.
|
# Limit number of leases to prevent a denial-of-service.
|
||||||
neutron_dnsmasq_lease_max: 16777216
|
neutron_dnsmasq_lease_max: 16777216
|
||||||
# If ``neutron_num_sync_threads`` is unset, the system will use the value of api_workers calculated
|
# If ``neutron_num_sync_threads`` is unset, the system will use the value of
|
||||||
# in templates/dhcp_agent.ini.j2 for num_sync_threads.
|
# neutron_api_threads in templates/dhcp_agent.ini.j2 for num_sync_threads.
|
||||||
# neutron_num_sync_threads: 4
|
# neutron_num_sync_threads: 4
|
||||||
|
|
||||||
## RPC
|
## RPC
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Capping the default value for the variables ``neutron_api_workers``,
|
||||||
|
``neutron_num_sync_threads`` and ``neutron_metadata_workers`` 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,13 +1,10 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{% set _api_threads = ansible_processor_vcpus|default(2) // 2 %}
|
|
||||||
{% set api_threads = _api_threads if _api_threads > 0 else 1 %}
|
|
||||||
|
|
||||||
# General
|
# General
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
debug = {{ debug }}
|
debug = {{ debug }}
|
||||||
|
|
||||||
num_sync_threads = {{ neutron_num_sync_threads | default(api_threads) }}
|
num_sync_threads = {{ neutron_num_sync_threads | default(neutron_api_threads) }}
|
||||||
|
|
||||||
# Drivers
|
# Drivers
|
||||||
interface_driver = {{ neutron_plugins[neutron_plugin_type].driver_interface }}
|
interface_driver = {{ neutron_plugins[neutron_plugin_type].driver_interface }}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{% set _api_threads = ansible_processor_vcpus|default(2) // 2 %}
|
|
||||||
{% set api_threads = _api_threads if _api_threads > 0 else 1 %}
|
|
||||||
|
|
||||||
# General
|
# General
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
debug = {{ debug }}
|
debug = {{ debug }}
|
||||||
@ -27,7 +24,7 @@ nova_metadata_port = {{ nova_metadata_port }}
|
|||||||
metadata_proxy_shared_secret = {{ nova_metadata_proxy_secret }}
|
metadata_proxy_shared_secret = {{ nova_metadata_proxy_secret }}
|
||||||
|
|
||||||
# Workers and backlog requests
|
# Workers and backlog requests
|
||||||
metadata_workers = {{ neutron_metadata_workers | default(api_threads) }}
|
metadata_workers = {{ neutron_metadata_workers | default(neutron_api_threads) }}
|
||||||
metadata_backlog = {{ neutron_metadata_backlog }}
|
metadata_backlog = {{ neutron_metadata_backlog }}
|
||||||
|
|
||||||
# Caching
|
# Caching
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{% set _api_threads = [ansible_processor_vcpus|default(2) // 2, neutron_api_threads_max] | min %}
|
|
||||||
{% set api_threads = _api_threads if _api_threads > 0 else 1 %}
|
|
||||||
|
|
||||||
# General, applies to all host groups
|
# General, applies to all host groups
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
# Disable stderr logging
|
# Disable stderr logging
|
||||||
@ -78,7 +75,7 @@ bind_port = 9696
|
|||||||
bind_host = 0.0.0.0
|
bind_host = 0.0.0.0
|
||||||
|
|
||||||
# Workers
|
# Workers
|
||||||
api_workers = {{ neutron_api_workers | default(api_threads) }}
|
api_workers = {{ neutron_api_workers | default(neutron_api_threads) }}
|
||||||
rpc_workers = {{ neutron_rpc_workers }}
|
rpc_workers = {{ neutron_rpc_workers }}
|
||||||
|
|
||||||
{% set dhcp_agents_max = num_agent if num_agent > 2 else 2 %}
|
{% set dhcp_agents_max = num_agent if num_agent > 2 else 2 %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user