From 37c741e5454e553bc170784a504de0c547fe7b73 Mon Sep 17 00:00:00 2001
From: Travis Truman
Date: Tue, 6 Sep 2016 14:36:23 -0400
Subject: [PATCH] Enable HiPE compile configuration
The ``rabbitmq_server`` role now supports configuring HiPE compilation
of the RabbitMQ server Erlang code. This configuration option may improve
server performance for some workloads and hardware. Deployers can
override the ``rabbitmq_hipe_compile`` variable, setting a value of
``True`` if they wish to enable this feature.
Change-Id: I433d94eff00ac82a9069f9092faa87d449190442
---
defaults/main.yml | 3 +++
.../notes/hipe-compile-option-c100e8676a806950.yaml | 7 +++++++
templates/rabbitmq.config.j2 | 5 +++--
tests/test-vars.yml | 2 ++
vars/debian.yml | 1 +
5 files changed, 16 insertions(+), 2 deletions(-)
create mode 100644 releasenotes/notes/hipe-compile-option-c100e8676a806950.yaml
diff --git a/defaults/main.yml b/defaults/main.yml
index a87344ac..65d01367 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -79,3 +79,6 @@ rabbitmq_collect_statistics_interval: 5000
# RabbitMQ Management rates mode
rabbitmq_management_rates_mode: basic
+
+# Precompile RabbitMQ with HiPE
+rabbitmq_hipe_compile: False
diff --git a/releasenotes/notes/hipe-compile-option-c100e8676a806950.yaml b/releasenotes/notes/hipe-compile-option-c100e8676a806950.yaml
new file mode 100644
index 00000000..879aed9c
--- /dev/null
+++ b/releasenotes/notes/hipe-compile-option-c100e8676a806950.yaml
@@ -0,0 +1,7 @@
+---
+features:
+ - The ``rabbitmq_server`` role now supports configuring HiPE compilation
+ of the RabbitMQ server Erlang code. This configuration option may improve
+ server performance for some workloads and hardware. Deployers can
+ override the ``rabbitmq_hipe_compile`` variable, setting a value of
+ ``True`` if they wish to enable this feature.
diff --git a/templates/rabbitmq.config.j2 b/templates/rabbitmq.config.j2
index 9c25656e..0f7c98f0 100644
--- a/templates/rabbitmq.config.j2
+++ b/templates/rabbitmq.config.j2
@@ -10,8 +10,9 @@
{% endif -%}
{versions, ['tlsv1.2', 'tlsv1.1']},
{verify,verify_none},
- {fail_if_no_peer_cert,false}]},
- {% if rabbitmq_cluster_partition_handling != 'ignore' %}{cluster_partition_handling, {{ rabbitmq_cluster_partition_handling }}}{% endif %}
+ {fail_if_no_peer_cert,false}]}
+ {% if rabbitmq_cluster_partition_handling != 'ignore' %},{cluster_partition_handling, {{ rabbitmq_cluster_partition_handling }}}{% endif %}
+ {% if rabbitmq_hipe_compile | bool %},{hipe_compile, true}{% endif %}
]},
{rabbitmq_management, [{rates_mode, {{ rabbitmq_management_rates_mode }} }] }
].
diff --git a/tests/test-vars.yml b/tests/test-vars.yml
index 71f77766..ca8ea22b 100644
--- a/tests/test-vars.yml
+++ b/tests/test-vars.yml
@@ -3,6 +3,8 @@ rabbitmq_cookie_token: secrete
rabbitmq_ssl_cert: /etc/rabbitmq/rabbitmq.pem
rabbitmq_ssl_key: /etc/rabbitmq/rabbitmq.key
+rabbitmq_hipe_compile: True
+
rabbitmq_old_package:
debian:
rabbitmq_package_url: "https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server_3.6.1-1_all.deb"
diff --git a/vars/debian.yml b/vars/debian.yml
index 742bf3af..c5090a2d 100644
--- a/vars/debian.yml
+++ b/vars/debian.yml
@@ -20,5 +20,6 @@ _rabbitmq_package_sha256: "9de570ca9e3d30bdc26a79c683503e158d35e5cacafb36e4e9b01
_rabbitmq_package_path: "/opt/rabbitmq-server.deb"
rabbitmq_dependencies:
+ - erlang-base-hipe
- erlang-nox
- socat