Closed bernd closed 11 years ago
Duplicate of #127 and #114. This needs to be fixed in JRuby. Use March Hare if you want to use JRuby.
It has nothing to do with heartbeats. IO.select
in a loop on JRuby uses an abnormally high amount of CPU.
Yikes, sorry for the noise. :(
Running the following code with Bunny 1.0.0.rc3, JRuby 1.7.6 and RabbitMQ 3.2.0 on Ubuntu 12.04 shows a high CPU usage after 600 seconds.
See also: https://gist.github.com/bernd/97e2f32ecd2f7c127e07
The program just connects to the RabbitMQ broker, opens a channel and declares an exchange. After around 600 seconds the top shows a CPU usage of 100%.
VisualVM shows that the Ruby thread
../lib/bunny/reader_loop.rb:21
eats the CPU.I guess this has something to do with the default heartbeat of 600?