-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JMH benchmark #88
Comments
Configuration:
The White Rabbit results:
Reactor RabbitMQ results:
|
A link to Reactor RabbitMQ benchmark: https://github.com/reactor/reactor-rabbitmq/blob/master/src/jmh/java/reactor/rabbitmq/SenderBenchmark.java |
@acogoluegnes we would like to ask you to review this test if you'll have time and desire. Critics is absolutely welcome. |
@asm0dey @viartemev Thanks for bringing up this topic. Here are the results I got:
The White Rabbit is faster for small number of messages (10-), maybe because Reactor RabbitMQ initializes a bunch of staff compared to the amount of actual processing. For higher number of messages, both libraries behave roughly the same. Both libraries use the RabbitMQ Java client, so I guess it all comes down to the respective extra layer (Kotlin/Reactor) and the publish confirms handling. Note I got a few errors when running the White Rabbit benchmarks (during warm-up, I don't think it affects the results):
|
Gave another try after changing the publishing handling in Reactor RabbitMQ to use the same algorithm and data structure as in the White Rabbit:
Pretty much the same conclusion for small number number of messages, but the White Rabbit publish confirms algorithm makes Reactor RabbitMQ a bit faster for large number of messages (10K+). |
@acogoluegnes cool, may I see please changes you used in Reactor RabbitMQ? Just curious what was written better @viartemev I tend to think that it's the difference between Linux and Mac hosts. Will benchmark on my laptop too. |
@asm0dey I pushed the changes reactor/reactor-rabbitmq@9404592 It may be due a thread that is spawned but no properly stopped. This doesn't happen in the Reactor RabbitMQ benchmark run on Linux, so it must something related to the White Rabbit library. |
@acogoluegnes I'm happy to read that my idea on confirmed publication helps your implementation too :) |
Add JHM benchmark and compare it with https://github.com/reactor/reactor-rabbitmq
The text was updated successfully, but these errors were encountered: