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: I159bb64d024c2207526c73212d68230d8362164c
This commit is contained in:
parent
9178e80020
commit
4fcd49b592
@ -58,7 +58,7 @@
|
||||
#
|
||||
# [*service_workers*]
|
||||
# (optional) Number of cinder-api workers
|
||||
# Defaults to $::processorcount
|
||||
# Defaults to $::os_workers
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) The state of the package
|
||||
@ -210,7 +210,7 @@ class cinder::api (
|
||||
$keymgr_api_class = $::os_service_default,
|
||||
$keymgr_encryption_api_url = $::os_service_default,
|
||||
$keymgr_encryption_auth_url = $::os_service_default,
|
||||
$service_workers = $::processorcount,
|
||||
$service_workers = $::os_workers,
|
||||
$package_ensure = 'present',
|
||||
$bind_host = '0.0.0.0',
|
||||
$enabled = true,
|
||||
|
@ -50,7 +50,7 @@
|
||||
#
|
||||
# [*threads*]
|
||||
# (optional) The number of threads for the vhost.
|
||||
# Defaults to $::processorcount
|
||||
# Defaults to $::os_workers
|
||||
#
|
||||
# [*ssl_cert*]
|
||||
# [*ssl_key*]
|
||||
@ -86,7 +86,7 @@ class cinder::wsgi::apache (
|
||||
$ssl_crl_path = undef,
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$threads = $::processorcount,
|
||||
$threads = $::os_workers,
|
||||
$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.
|
@ -412,7 +412,7 @@ describe 'cinder::api' do
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({
|
||||
:processorcount => 8,
|
||||
:os_workers => 8,
|
||||
:fqdn => 'some.host.tld',
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
}))
|
||||
|
@ -59,7 +59,7 @@ describe 'cinder::backup::glusterfs' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder backup with glusterfs'
|
||||
|
@ -103,7 +103,7 @@ describe 'cinder::backup::google' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder backup with google cloud storage'
|
||||
|
@ -72,7 +72,7 @@ describe 'cinder::backup::nfs' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder backup with nfs'
|
||||
|
@ -68,7 +68,7 @@ describe 'cinder::backup::posix' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder backup with posix'
|
||||
|
@ -89,7 +89,7 @@ describe 'cinder::backup' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
|
@ -85,7 +85,7 @@ describe 'cinder::backup::swift' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder backup with swift'
|
||||
|
@ -63,7 +63,7 @@ describe 'cinder::backup::tsm' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder backup with tsm'
|
||||
|
@ -32,7 +32,7 @@ describe 'cinder::client' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder client'
|
||||
|
@ -30,7 +30,7 @@ describe 'cinder::db::postgresql' do
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({
|
||||
:processorcount => 8,
|
||||
:os_workers => 8,
|
||||
:concat_basedir => '/var/lib/puppet/concat'
|
||||
}))
|
||||
end
|
||||
|
@ -40,7 +40,7 @@ describe 'cinder::db::sync' do
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({
|
||||
:processorcount => 8,
|
||||
:os_workers => 8,
|
||||
:concat_basedir => '/var/lib/puppet/concat'
|
||||
}))
|
||||
end
|
||||
|
@ -71,7 +71,7 @@ describe 'cinder::glance' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder with glance'
|
||||
|
@ -110,7 +110,7 @@ describe 'cinder::logging' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder-logging'
|
||||
|
@ -46,7 +46,7 @@ describe 'cinder::quota' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder quota'
|
||||
|
@ -51,7 +51,7 @@ describe 'cinder::scheduler::filter' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'cinder scheduler filter'
|
||||
|
@ -45,7 +45,7 @@ describe 'cinder::volume::glusterfs' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'glusterfs volume driver'
|
||||
|
@ -29,7 +29,7 @@ describe 'cinder::volume::quobyte' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'quobyte volume driver'
|
||||
|
@ -79,7 +79,7 @@ describe 'cinder::wsgi::apache' do
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts({
|
||||
:processorcount => 42,
|
||||
:os_workers => 42,
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
:fqdn => 'some.host.tld',
|
||||
}))
|
||||
|
@ -66,7 +66,7 @@ describe 'cinder::backend::glusterfs' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'glusterfs volume driver'
|
||||
|
@ -39,7 +39,7 @@ describe 'cinder::backend::quobyte' do
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
|
||||
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
|
||||
end
|
||||
|
||||
it_configures 'quobyte volume driver'
|
||||
|
Loading…
x
Reference in New Issue
Block a user