Bumping up thread pool for rabbitmq-server
The default thread pool for rabbitmq-server is set to 30, when there are more cores available we should be bumping up this number higher for better performance. Change-Id: Ie98fcd49a2dc35fd212e15d4d78a9a4c8c4e44bf Closes-bug: 1472793
This commit is contained in:
parent
f5d79479f5
commit
d2573ceea0
|
@ -63,6 +63,8 @@ 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,
|
||||
|
@ -88,7 +90,7 @@ class mcollective::rabbitmq (
|
|||
'tcp_listen_options' => $rabbit_tcp_listen_options,
|
||||
},
|
||||
environment_variables => {
|
||||
'SERVER_ERL_ARGS' => '"+K true +A30 +P 1048576"',
|
||||
'SERVER_ERL_ARGS' => "\"+K true +A${thread_pool_calc} +P 1048576\"",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ $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":
|
||||
|
@ -49,7 +51,7 @@ class { 'nailgun::rabbitmq':
|
|||
mco_vhost => $mco_vhost,
|
||||
stomp => $stomp,
|
||||
env_config => {
|
||||
'RABBITMQ_SERVER_ERL_ARGS' => '+K true +A30 +P 1048576',
|
||||
'RABBITMQ_SERVER_ERL_ARGS' => "+K true +A${thread_pool_calc} +P 1048576",
|
||||
'NODENAME' => "rabbit@${::hostname}",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -177,8 +177,11 @@ class openstack::nova::controller (
|
|||
# we have to define autoheal as a config_variables instead of a parameter.
|
||||
'cluster_partition_handling' => $cluster_partition_handling,
|
||||
}
|
||||
|
||||
$thread_pool_calc = min(100,max(12*$physicalprocessorcount,30))
|
||||
|
||||
$environment_variables = {
|
||||
'SERVER_ERL_ARGS' => '"+K true +A30 +P 1048576"',
|
||||
'SERVER_ERL_ARGS' => "\"+K true +A${thread_pool_calc} +P 1048576\"",
|
||||
'PID_FILE' => $rabbit_pid_file,
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,9 @@ if $queue_provider == 'rabbitmq' {
|
|||
'mnesia_table_loading_timeout' => $mnesia_table_loading_timeout,
|
||||
}
|
||||
)
|
||||
|
||||
$thread_pool_calc = min(100,max(12*$physicalprocessorcount,30))
|
||||
|
||||
if $deployment_mode == 'ha_compact' {
|
||||
$rabbit_pid_file = '/var/run/rabbitmq/p_pid'
|
||||
} else {
|
||||
|
@ -84,7 +87,7 @@ if $queue_provider == 'rabbitmq' {
|
|||
}
|
||||
$environment_variables = hiera('rabbit_environment_variables',
|
||||
{
|
||||
'SERVER_ERL_ARGS' => '"+K true +A30 +P 1048576"',
|
||||
'SERVER_ERL_ARGS' => "\"+K true +A${thread_pool_calc} +P 1048576\"",
|
||||
'PID_FILE' => $rabbit_pid_file,
|
||||
}
|
||||
)
|
||||
|
|
|
@ -3,6 +3,20 @@ require 'shared-examples'
|
|||
manifest = 'rabbitmq/rabbitmq.pp'
|
||||
|
||||
describe manifest do
|
||||
shared_examples 'catalog' do
|
||||
def resource_parameter_value(resource_type, resource_name, parameter)
|
||||
catalog = subject
|
||||
catalog = subject.call if subject.is_a? Proc
|
||||
resource = catalog.resource resource_type, resource_name
|
||||
raise "No resource type: '#{resource_type}' name: '#{resource_name}' in catalog!" unless resource
|
||||
resource[parameter.to_sym]
|
||||
end
|
||||
|
||||
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"'
|
||||
end
|
||||
|
||||
end
|
||||
test_ubuntu_and_centos manifest
|
||||
end
|
||||
|
||||
|
|
|
@ -170,39 +170,41 @@ module Noop
|
|||
|
||||
def self.ubuntu_facts
|
||||
{
|
||||
:fqdn => fqdn,
|
||||
:hostname => hostname,
|
||||
:processorcount => '4',
|
||||
:memorysize_mb => '32138.66',
|
||||
:memorysize => '31.39 GB',
|
||||
:kernel => 'Linux',
|
||||
:osfamily => 'Debian',
|
||||
:operatingsystem => 'Ubuntu',
|
||||
:fqdn => fqdn,
|
||||
:hostname => hostname,
|
||||
:physicalprocessorcount => '4',
|
||||
:processorcount => '4',
|
||||
:memorysize_mb => '32138.66',
|
||||
:memorysize => '31.39 GB',
|
||||
:kernel => 'Linux',
|
||||
:osfamily => 'Debian',
|
||||
:operatingsystem => 'Ubuntu',
|
||||
:operatingsystemrelease => '14.04',
|
||||
:lsbdistid => 'Ubuntu',
|
||||
:l3_fqdn_hostname => hostname,
|
||||
:l3_default_route => '172.16.1.1',
|
||||
:concat_basedir => '/tmp/',
|
||||
:l23_os => 'ubuntu',
|
||||
:lsbdistid => 'Ubuntu',
|
||||
:l3_fqdn_hostname => hostname,
|
||||
:l3_default_route => '172.16.1.1',
|
||||
:concat_basedir => '/tmp/',
|
||||
:l23_os => 'ubuntu',
|
||||
}
|
||||
end
|
||||
|
||||
def self.centos_facts
|
||||
{
|
||||
:fqdn => fqdn,
|
||||
:hostname => hostname,
|
||||
:processorcount => '4',
|
||||
:memorysize_mb => '32138.66',
|
||||
:memorysize => '31.39 GB',
|
||||
:kernel => 'Linux',
|
||||
:osfamily => 'RedHat',
|
||||
:operatingsystem => 'CentOS',
|
||||
:fqdn => fqdn,
|
||||
:hostname => hostname,
|
||||
:physicalprocessorcount => '4',
|
||||
:processorcount => '4',
|
||||
:memorysize_mb => '32138.66',
|
||||
:memorysize => '31.39 GB',
|
||||
:kernel => 'Linux',
|
||||
:osfamily => 'RedHat',
|
||||
:operatingsystem => 'CentOS',
|
||||
:operatingsystemrelease => '6.5',
|
||||
:lsbdistid => 'CentOS',
|
||||
:l3_fqdn_hostname => hostname,
|
||||
:l3_default_route => '172.16.1.1',
|
||||
:concat_basedir => '/tmp/',
|
||||
:l23_os => 'centos6',
|
||||
:lsbdistid => 'CentOS',
|
||||
:l3_fqdn_hostname => hostname,
|
||||
:l3_default_route => '172.16.1.1',
|
||||
:concat_basedir => '/tmp/',
|
||||
:l23_os => 'centos6',
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue