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: Ib03ad48060349921b94fc4c794b3e02f41ad979d
This commit is contained in:
@@ -50,7 +50,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
|
||||||
#
|
#
|
||||||
# [*ssl_cert*]
|
# [*ssl_cert*]
|
||||||
# [*ssl_key*]
|
# [*ssl_key*]
|
||||||
@@ -87,7 +87,7 @@ class ironic::wsgi::apache (
|
|||||||
$ssl_crl_path = undef,
|
$ssl_crl_path = undef,
|
||||||
$ssl_crl = undef,
|
$ssl_crl = undef,
|
||||||
$ssl_certs_dir = undef,
|
$ssl_certs_dir = undef,
|
||||||
$threads = $::processorcount,
|
$threads = $::os_workers,
|
||||||
$priority = '10',
|
$priority = '10',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
@@ -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.
|
@@ -145,7 +145,6 @@ describe 'ironic::api' do
|
|||||||
:operatingsystemrelease => '8.0',
|
:operatingsystemrelease => '8.0',
|
||||||
:concat_basedir => '/var/lib/puppet/concat',
|
:concat_basedir => '/var/lib/puppet/concat',
|
||||||
:fqdn => 'some.host.tld',
|
:fqdn => 'some.host.tld',
|
||||||
:processorcount => 2,
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -165,7 +164,6 @@ describe 'ironic::api' do
|
|||||||
:operatingsystemrelease => '7.2',
|
:operatingsystemrelease => '7.2',
|
||||||
:concat_basedir => '/var/lib/puppet/concat',
|
:concat_basedir => '/var/lib/puppet/concat',
|
||||||
:fqdn => 'some.host.tld',
|
:fqdn => 'some.host.tld',
|
||||||
:processorcount => 2,
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ describe 'ironic::db::postgresql' do
|
|||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let (:facts) do
|
let (:facts) do
|
||||||
facts.merge(OSDefaults.get_facts({
|
facts.merge(OSDefaults.get_facts({
|
||||||
:processorcount => 8,
|
:os_workers => 8,
|
||||||
:concat_basedir => '/var/lib/puppet/concat'
|
:concat_basedir => '/var/lib/puppet/concat'
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
|
@@ -37,7 +37,7 @@ describe 'ironic::db::sync' do
|
|||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let (:facts) do
|
let (:facts) do
|
||||||
facts.merge(OSDefaults.get_facts({
|
facts.merge(OSDefaults.get_facts({
|
||||||
:processorcount => 8,
|
:os_workers => 8,
|
||||||
:concat_basedir => '/var/lib/puppet/concat'
|
:concat_basedir => '/var/lib/puppet/concat'
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
|
@@ -4,7 +4,7 @@ describe 'ironic::wsgi::apache' do
|
|||||||
|
|
||||||
let :global_facts do
|
let :global_facts do
|
||||||
OSDefaults.get_facts({
|
OSDefaults.get_facts({
|
||||||
: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'
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user