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: Idfd8e3f4fe91df7d70e8c35a491c076b0b8f2348
This commit is contained in:
parent
36263dc353
commit
86221d0df0
@ -69,7 +69,7 @@
|
||||
#
|
||||
# [*workers*]
|
||||
# (optional) Number of trove API worker processes to start
|
||||
# Default: $::processorcount
|
||||
# Default: $::os_workers
|
||||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether to enable services.
|
||||
@ -156,7 +156,7 @@ class trove::api(
|
||||
$bind_host = '0.0.0.0',
|
||||
$bind_port = '8779',
|
||||
$backlog = '4096',
|
||||
$workers = $::processorcount,
|
||||
$workers = $::os_workers,
|
||||
$enabled = true,
|
||||
$purge_config = false,
|
||||
$cert_file = false,
|
||||
|
@ -48,7 +48,7 @@
|
||||
#
|
||||
# [*workers*]
|
||||
# (optional) Number of trove conductor worker processes to start
|
||||
# Default: $::processorcount
|
||||
# Default: $::os_workers
|
||||
#
|
||||
# [*enable_profiler*]
|
||||
# (optional) If False fully disable profiling feature.
|
||||
@ -75,7 +75,7 @@ class trove::conductor(
|
||||
$log_facility = $::os_service_default,
|
||||
$auth_url = 'http://localhost:5000/v2.0',
|
||||
$conductor_manager = 'trove.conductor.manager.Manager',
|
||||
$workers = $::processorcount,
|
||||
$workers = $::os_workers,
|
||||
$enable_profiler = $::os_service_default,
|
||||
$trace_sqlalchemy = $::os_service_default,
|
||||
# Deprecated
|
||||
|
@ -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.
|
@ -277,7 +277,7 @@ describe 'trove::api' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
:osfamily => 'Debian',
|
||||
:processorcount => 8,
|
||||
:os_workers => 8,
|
||||
})
|
||||
end
|
||||
|
||||
@ -293,7 +293,7 @@ describe 'trove::api' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
:osfamily => 'RedHat',
|
||||
:processorcount => 8,
|
||||
:os_workers => 8,
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -198,7 +198,7 @@ describe 'trove::conductor' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
:osfamily => 'Debian',
|
||||
:processorcount => 8,
|
||||
:os_workers => 8,
|
||||
})
|
||||
end
|
||||
|
||||
@ -214,7 +214,7 @@ describe 'trove::conductor' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
:osfamily => 'RedHat',
|
||||
:processorcount => 8,
|
||||
:os_workers => 8,
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -30,7 +30,7 @@ describe 'trove::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
|
||||
|
@ -218,7 +218,7 @@ describe 'trove::guestagent' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
:osfamily => 'Debian',
|
||||
:processorcount => 8
|
||||
:os_workers => 8
|
||||
})
|
||||
end
|
||||
|
||||
@ -234,7 +234,7 @@ describe 'trove::guestagent' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
:osfamily => 'RedHat',
|
||||
:processorcount => 8
|
||||
:os_workers => 8
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -306,7 +306,7 @@ describe 'trove::taskmanager' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
:osfamily => 'Debian',
|
||||
:processorcount => 8
|
||||
:os_workers => 8
|
||||
})
|
||||
end
|
||||
|
||||
@ -322,7 +322,7 @@ describe 'trove::taskmanager' do
|
||||
let :facts do
|
||||
@default_facts.merge({
|
||||
:osfamily => 'RedHat',
|
||||
:processorcount => 8
|
||||
:os_workers => 8
|
||||
})
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user