Use High-Performance Erlang (HiPE) compiler with RabbitMQ open source message broker.
What you need to know
High-Performance Erlang (HiPE) was an ASTEC (Advanced Software TEChnology) project at the Department of Information Technology of Uppsala University during 1998–2005.
Currently HiPE compilation is not supported since the release of the release of Erlang 22 (see OTP-15596 [2019-05-14]).
OTP-15596 Application(s): erts, hipe, otp *** HIGHLIGHT *** In OTP 22, HiPE (the native code compiler) is not fully functional. The reasons for this are: There are new BEAM instructions for binary matching that the HiPE native code compiler does not support. The new optimizations in the Erlang compiler create new combination of instructions that HiPE currently does not handle correctly. If erlc is invoked with the +native option, and if any of the new binary matching instructions are used, the compiler will issue a warning and produce a BEAM file without native code.
Support for HiPE is dropped in recent releases, but there is an LLVM based just-in-time compiler for Erlang on the horizon.
RabbitMQ HiPE configuration
Use Erlang to display RabbitMQ version.
$ sudo rabbitmqctl eval "rabbit_misc:version()." "3.6.16"
Use Erlang to display OTP release number.
$ sudo rabbitmqctl eval "rabbit_misc:otp_release()." "19.2.1"
Use Erlang to display HiPE configuration option.
$ sudo rabbitmqctl eval "application:get_env(rabbit, hipe_enabled)." {ok,false}
Set HiPE configuration option to true.
$ cat /etc/rabbitmq/rabbitmq.config [ {rabbit, [{hipe_compile, true}]} ].
Restart RabbitMQ message broker.
$ sudo systemctl restart rabbitmq-server
Use Erlang to display hipe_enabled option.
$ sudo rabbitmqctl eval "application:get_env(rabbit, hipe_enabled)." {ok,true}
Simple benchmarks
The following results were obtained in a controlled environment, but are not representative in any way.
| ||
---|---|---|
One publisher/One consumer | ||
One publisher/Two consumers | ||
One publisher/Four consumers | ||
One publisher/Eight consumers | ||
One publisher/Sixteen consumers |
These benchmarks were created using RabbitMQ PerfTest.