Change worker defaults to ::os_workers
This patch changes the default worker count from ::processorcount to the new ::os_workers fact. ::os_workers is based on the number of processors (currently cpu/4) but is capped at a maximum of 8 worker processors. This is a much more reasonable default in general and prevents excessive resource consumption on systems with a large number of CPUs. Change-Id: I3808177027a880c88f075cdbef0aba2a56fb26bc
This commit is contained in:
parent
f4df279c4a
commit
74e52d294c
@ -27,7 +27,7 @@
|
|||||||
#
|
#
|
||||||
# [*workers*]
|
# [*workers*]
|
||||||
# (optional) Number of Glance API worker processes to start
|
# (optional) Number of Glance API worker processes to start
|
||||||
# Default: $::processorcount
|
# Default: $::os_workers.
|
||||||
#
|
#
|
||||||
# [*log_file*]
|
# [*log_file*]
|
||||||
# (optional) The path of file used for logging
|
# (optional) The path of file used for logging
|
||||||
@ -320,7 +320,7 @@ class glance::api(
|
|||||||
$bind_host = $::os_service_default,
|
$bind_host = $::os_service_default,
|
||||||
$bind_port = '9292',
|
$bind_port = '9292',
|
||||||
$backlog = $::os_service_default,
|
$backlog = $::os_service_default,
|
||||||
$workers = $::processorcount,
|
$workers = $::os_workers,
|
||||||
$log_file = undef,
|
$log_file = undef,
|
||||||
$log_dir = undef,
|
$log_dir = undef,
|
||||||
$registry_host = '0.0.0.0',
|
$registry_host = '0.0.0.0',
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#
|
#
|
||||||
# [*workers*]
|
# [*workers*]
|
||||||
# (optional) Number of Glance Glare worker processes to start
|
# (optional) Number of Glance Glare worker processes to start
|
||||||
# Default: $::processorcount
|
# Default: $::os_workers.
|
||||||
#
|
#
|
||||||
# [*auth_strategy*]
|
# [*auth_strategy*]
|
||||||
# (optional) Type is authorization being used.
|
# (optional) Type is authorization being used.
|
||||||
@ -134,7 +134,7 @@ class glance::glare(
|
|||||||
$bind_host = '0.0.0.0',
|
$bind_host = '0.0.0.0',
|
||||||
$bind_port = '9494',
|
$bind_port = '9494',
|
||||||
$backlog = '4096',
|
$backlog = '4096',
|
||||||
$workers = $::processorcount,
|
$workers = $::os_workers,
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$pipeline = 'keystone',
|
$pipeline = 'keystone',
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
# [*workers*]
|
# [*workers*]
|
||||||
# (optional) The number of child process workers that will be
|
# (optional) The number of child process workers that will be
|
||||||
# created to service Registry requests.
|
# created to service Registry requests.
|
||||||
# Defaults to: $::processorcount
|
# Defaults to: $::os_workers.
|
||||||
#
|
#
|
||||||
# [*log_file*]
|
# [*log_file*]
|
||||||
# (optional) Log file for glance-registry.
|
# (optional) Log file for glance-registry.
|
||||||
@ -174,7 +174,7 @@ class glance::registry(
|
|||||||
$debug = undef,
|
$debug = undef,
|
||||||
$bind_host = $::os_service_default,
|
$bind_host = $::os_service_default,
|
||||||
$bind_port = '9191',
|
$bind_port = '9191',
|
||||||
$workers = $::processorcount,
|
$workers = $::os_workers,
|
||||||
$log_file = undef,
|
$log_file = undef,
|
||||||
$log_dir = undef,
|
$log_dir = undef,
|
||||||
$database_connection = undef,
|
$database_connection = undef,
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
other:
|
||||||
|
- Parameters that control the number of spawned child processes for
|
||||||
|
distributing processing have had their default value changed from
|
||||||
|
::processorcount to ::os_workers.
|
@ -7,7 +7,7 @@ describe 'glance::registry' do
|
|||||||
:use_stderr => '<SERVICE DEFAULT>',
|
:use_stderr => '<SERVICE DEFAULT>',
|
||||||
:bind_host => '<SERVICE DEFAULT>',
|
:bind_host => '<SERVICE DEFAULT>',
|
||||||
:bind_port => '9191',
|
:bind_port => '9191',
|
||||||
:workers => facts[:processorcount],
|
:workers => facts[:os_workers],
|
||||||
:log_file => '/var/log/glance/registry.log',
|
:log_file => '/var/log/glance/registry.log',
|
||||||
:log_dir => '/var/log/glance',
|
:log_dir => '/var/log/glance',
|
||||||
:enabled => true,
|
:enabled => true,
|
||||||
|
Loading…
Reference in New Issue
Block a user