Remove erlang/rabbit thread pool calculation
Proper version of this calculation is implemented upstream - https://github.com/rabbitmq/rabbitmq-server/issues/151 And removed version of the code is actually harmful, as it's using physicalprocessorcount (i.e. number of CPU sockets) for calculations. So on a 2 CPU/48 thread system there it was 30 threads instead of 768 calculated upstream. I've decided that it's easier to completely remove this code instead of duplicating current formula in upstream and providing a way to override this value through hiera - just not worth a hassle. Change-Id: I415d446af0a822d2a5ce3478fd9db1dd0f13e115 Closes-Bug: 1573696
This commit is contained in:
parent
9cc897ac44
commit
2858871ff0
|
@ -63,8 +63,6 @@ class mcollective::rabbitmq (
|
|||
{keepalive, true}
|
||||
]'
|
||||
|
||||
$thread_pool_calc = min(100,max(12*$physicalprocessorcount,30))
|
||||
|
||||
# NOTE(bogdando) this requires rabbitmq>=4.0 module
|
||||
class { '::rabbitmq':
|
||||
admin_enable => true,
|
||||
|
@ -90,7 +88,7 @@ class mcollective::rabbitmq (
|
|||
'tcp_listen_options' => $rabbit_tcp_listen_options,
|
||||
},
|
||||
environment_variables => {
|
||||
'SERVER_ERL_ARGS' => "\"+K true +A${thread_pool_calc} +P 1048576\"",
|
||||
'SERVER_ERL_ARGS' => "\"+K true +P 1048576\"",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ $mco_password = $::fuel_settings['mcollective']['password']
|
|||
$mco_vhost = "mcollective"
|
||||
$stomp = false
|
||||
|
||||
$thread_pool_calc = min(100,max(12*$physicalprocessorcount,30))
|
||||
|
||||
class {'docker::container': }
|
||||
|
||||
user { "rabbitmq":
|
||||
|
@ -51,7 +49,7 @@ class { 'nailgun::rabbitmq':
|
|||
mco_vhost => $mco_vhost,
|
||||
stomp => $stomp,
|
||||
env_config => {
|
||||
'RABBITMQ_SERVER_ERL_ARGS' => "+K true +A${thread_pool_calc} +P 1048576",
|
||||
'RABBITMQ_SERVER_ERL_ARGS' => "+K true +P 1048576",
|
||||
'NODENAME' => "rabbit@${::hostname}",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -180,10 +180,8 @@ class openstack::nova::controller (
|
|||
'cluster_partition_handling' => $cluster_partition_handling,
|
||||
}
|
||||
|
||||
$thread_pool_calc = min(100,max(12*$physicalprocessorcount,30))
|
||||
|
||||
$environment_variables = {
|
||||
'SERVER_ERL_ARGS' => "\"+K true +A${thread_pool_calc} +P 1048576\"",
|
||||
'SERVER_ERL_ARGS' => "\"+K true +P 1048576\"",
|
||||
'PID_FILE' => $rabbit_pid_file,
|
||||
}
|
||||
|
||||
|
|
|
@ -84,8 +84,6 @@ if $queue_provider == 'rabbitmq' {
|
|||
}
|
||||
)
|
||||
|
||||
$thread_pool_calc = min(100,max(12*$physicalprocessorcount,30))
|
||||
|
||||
if $deployment_mode == 'ha_compact' {
|
||||
$rabbit_pid_file = '/var/run/rabbitmq/p_pid'
|
||||
} else {
|
||||
|
@ -93,7 +91,7 @@ if $queue_provider == 'rabbitmq' {
|
|||
}
|
||||
$environment_variables = hiera('rabbit_environment_variables',
|
||||
{
|
||||
'SERVER_ERL_ARGS' => "\"+K true +A${thread_pool_calc} +P 1048576\"",
|
||||
'SERVER_ERL_ARGS' => "\"+K true +P 1048576\"",
|
||||
'PID_FILE' => $rabbit_pid_file,
|
||||
}
|
||||
)
|
||||
|
|
|
@ -14,7 +14,7 @@ describe manifest do
|
|||
|
||||
it 'has correct SERVER_ERL_ARGS in environment_variables' do
|
||||
environment_variables = resource_parameter_value 'class', 'rabbitmq', 'environment_variables'
|
||||
expect(environment_variables['SERVER_ERL_ARGS']).to eq '"+K true +A48 +P 1048576"'
|
||||
expect(environment_variables['SERVER_ERL_ARGS']).to eq '"+K true +P 1048576"'
|
||||
end
|
||||
|
||||
# LP#1477595
|
||||
|
|
Loading…
Reference in New Issue