From 859d74810baa56d7581b969743493797f2ee94d1 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Tue, 20 Sep 2016 10:11:54 +0200 Subject: RabbitMQ threads should be configured dynamically Currently in puppet/services/rabbitmq.yaml we hardcode the thread pool size to 30 (via the +A30 snippet): rabbitmq_environment: RABBITMQ_SERVER_ERL_ARGS: '"+K true +A30 +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]"' Upstream rabbit has gained the ability to dynamically configure the number of threads since 3.6.2 via the following commit: https://github.com/rabbitmq/rabbitmq-server/commit/41ce5ad808863944cd6d62ce7f7e2271f1010582 Given that the default was hardcoded in rabbit from at least 3.4.0 up until 3.6.2 (see LP bug associated to this commit), we can actually remove this hardcoded value as it overrides a sane default. Before the change: /usr/lib64/erlang/erts-7.3.1/bin/beam.smp -W w -A 64 -K true -A30 -P 1048576 ... After the change: /usr/lib64/erlang/erts-7.3.1/bin/beam.smp -W w -A 64 -K true -P 1048576 ... So effectively with this change we will have the following: - With older rabbitmq versions we keep the +A30 default - With rabbitmq versions >= 3.6.2 the thread number is dynamically computed to nr_cpus * 16 Change-Id: I8d30c7d141c29fcc439d40fc767498520be7966e Closes-Bug: #1625486 --- puppet/services/rabbitmq.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'puppet/services/rabbitmq.yaml') diff --git a/puppet/services/rabbitmq.yaml b/puppet/services/rabbitmq.yaml index e4a16e86..52300a2f 100644 --- a/puppet/services/rabbitmq.yaml +++ b/puppet/services/rabbitmq.yaml @@ -66,7 +66,7 @@ outputs: rabbitmq::repos_ensure: false rabbitmq_environment: RABBITMQ_NODENAME: "rabbit@%{::hostname}" - RABBITMQ_SERVER_ERL_ARGS: '"+K true +A30 +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]"' + RABBITMQ_SERVER_ERL_ARGS: '"+K true +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]"' rabbitmq_kernel_variables: inet_dist_listen_min: '25672' inet_dist_listen_max: '25672' -- cgit 1.2.3-korg