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: If0e1f051ecdc0e1cc9713c7300e72e0748e01737
This commit is contained in:
parent
beba04141b
commit
ea00eb26f2
@ -153,9 +153,9 @@ cinder_service_backup_metadata_version: 2
|
|||||||
|
|
||||||
cinder_swift_catalog_info: "object-store:swift:internalURL"
|
cinder_swift_catalog_info: "object-store:swift:internalURL"
|
||||||
|
|
||||||
# If ``cinder_osapi_volume_workers`` is unset the system will use half the number of
|
## Cap the maximun number of threads / workers when a user value is unspecified.
|
||||||
# available VCPUS to compute the number of api workers to use.
|
cinder_osapi_volume_workers_max: 16
|
||||||
# cinder_osapi_volume_workers: 16
|
cinder_osapi_volume_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, cinder_osapi_volume_workers_max] | min }}"
|
||||||
|
|
||||||
## Cinder iscsi
|
## Cinder iscsi
|
||||||
cinder_iscsi_helper: tgtadm
|
cinder_iscsi_helper: tgtadm
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Capping the default value for the variable ``cinder_osapi_volume_workers``
|
||||||
|
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.
|
@ -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 %}
|
|
||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
# Disable stderr logging
|
# Disable stderr logging
|
||||||
use_stderr = False
|
use_stderr = False
|
||||||
@ -10,7 +7,7 @@ debug = {{ debug }}
|
|||||||
fatal_deprecations = {{ cinder_fatal_deprecations }}
|
fatal_deprecations = {{ cinder_fatal_deprecations }}
|
||||||
my_ip = {{ cinder_management_address }}
|
my_ip = {{ cinder_management_address }}
|
||||||
|
|
||||||
osapi_volume_workers = {{ cinder_osapi_volume_workers | default(api_threads) }}
|
osapi_volume_workers = {{ cinder_osapi_volume_workers }}
|
||||||
|
|
||||||
rootwrap_config = /etc/cinder/rootwrap.conf
|
rootwrap_config = /etc/cinder/rootwrap.conf
|
||||||
api_paste_config = /etc/cinder/api-paste.ini
|
api_paste_config = /etc/cinder/api-paste.ini
|
||||||
|
Loading…
Reference in New Issue
Block a user