rabbitmq / ra

A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.
Other
813 stars 96 forks source link

Set off_heap for ra_servers #246

Closed kjnilsson closed 2 years ago

kjnilsson commented 2 years ago

Ra tends to implement centralised utilities such as data stores and thus will benefit from setting the off_heap message_queue_data strategy.

This will avoid messages being scanned by the Gc before they have been "received" as well as enables further fan-in scalability.

michaelklishin commented 2 years ago

@kjnilsson do you have any data that demonstrates how effective this may be?

michaelklishin commented 2 years ago

We have discussed the effectiveness of this on Slack. While off_heap is not free, we expect this to be a net positive, primarily around GC runs. There's some more testing ongoing as part of RabbitMQ.

michaelklishin commented 2 years ago

After a longer discussion with @lhoguin we decided that it probably won't matter much for RabbitMQ and, in fact, most use cases.