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: I458791aa8027cffeeec49698b302cb96ae5af2e2
This commit is contained in:
@@ -85,7 +85,7 @@
|
|||||||
#
|
#
|
||||||
# [*threads*]
|
# [*threads*]
|
||||||
# (optional) The number of threads for the vhost.
|
# (optional) The number of threads for the vhost.
|
||||||
# Defaults to $::processorcount
|
# Defaults to $::os_workers
|
||||||
#
|
#
|
||||||
# [*user*]
|
# [*user*]
|
||||||
# (optional) User with permissions on the script
|
# (optional) User with permissions on the script
|
||||||
@@ -145,7 +145,7 @@ define openstacklib::wsgi::apache (
|
|||||||
$ssl_crl = undef,
|
$ssl_crl = undef,
|
||||||
$ssl_crl_path = undef,
|
$ssl_crl_path = undef,
|
||||||
$ssl_key = undef,
|
$ssl_key = undef,
|
||||||
$threads = $::processorcount,
|
$threads = $::os_workers,
|
||||||
$user = undef,
|
$user = undef,
|
||||||
$workers = 1,
|
$workers = 1,
|
||||||
$wsgi_daemon_process = $name,
|
$wsgi_daemon_process = $name,
|
||||||
|
@@ -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.
|
@@ -23,7 +23,7 @@ describe 'openstacklib::wsgi::apache' do
|
|||||||
|
|
||||||
let :global_facts do
|
let :global_facts do
|
||||||
{
|
{
|
||||||
:processorcount => 42,
|
:os_workers => 8,
|
||||||
:concat_basedir => '/var/lib/puppet/concat',
|
:concat_basedir => '/var/lib/puppet/concat',
|
||||||
:fqdn => 'some.host.tld'
|
:fqdn => 'some.host.tld'
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ describe 'openstacklib::wsgi::apache' do
|
|||||||
'user' => 'keystone',
|
'user' => 'keystone',
|
||||||
'group' => 'keystone',
|
'group' => 'keystone',
|
||||||
'processes' => 1,
|
'processes' => 1,
|
||||||
'threads' => global_facts[:processorcount],
|
'threads' => global_facts[:os_workers],
|
||||||
},
|
},
|
||||||
'wsgi_application_group' => '%{GLOBAL}',
|
'wsgi_application_group' => '%{GLOBAL}',
|
||||||
'require' => 'File[keystone_wsgi]',
|
'require' => 'File[keystone_wsgi]',
|
||||||
@@ -116,7 +116,7 @@ describe 'openstacklib::wsgi::apache' do
|
|||||||
'user' => 'keystone',
|
'user' => 'keystone',
|
||||||
'group' => 'keystone',
|
'group' => 'keystone',
|
||||||
'processes' => '37',
|
'processes' => '37',
|
||||||
'threads' => '42',
|
'threads' => '8',
|
||||||
},
|
},
|
||||||
'wsgi_process_group' => 'keystone_wsgi',
|
'wsgi_process_group' => 'keystone_wsgi',
|
||||||
'wsgi_script_aliases' => { '/' => "/var/www/cgi-bin/keystone/main" },
|
'wsgi_script_aliases' => { '/' => "/var/www/cgi-bin/keystone/main" },
|
||||||
|
Reference in New Issue
Block a user