[rabbitmq-discuss] Performance degrades with increasing queue depth

Aisha Fenton aisha.fenton at gmail.com
Tue Sep 8 03:18:50 BST 2009


Code below uses tmm1-amqp instead of Bunny. I get 2000mps using this  
code, draining from the same queue.


test_pop_async.rb
---

require "rubygems"
require 'mq'

Signal.trap('INT') { AMQP.stop{ EM.stop } }
Signal.trap('TERM'){ AMQP.stop{ EM.stop } }

count ||= 0
prev_time ||= Time.now

AMQP.start(:host => 'localhost') do
   MQ.queue('process_telemetry').subscribe(:ack => false) do |headers,  
body|
     count += 1
     if count > 100
       t = Time.now
       puts("msgs pops per sec: #{count / (t - prev_time)}")
       prev_time = t
       count = 0
     end
   end
end



On 8/09/2009, at 1:53 PM, Chuck Remes wrote:

> Progress! Please share the code you are using now so we can compare  
> it to the bunny code. Perhaps something obvious will jump out at us  
> (punny!).
>
> cr
>
> On Sep 7, 2009, at 8:48 PM, Aisha Fenton wrote:
>
>> Hi Paolo,
>>
>>> the code provided for the publisher actually does seem likely to
>>> produce the channel leak
>>
>> I made the suggested change, and it made no difference.
>>
>> I have changed the test code to use tmm1-amqp (another Ruby AMQP  
>> library) and I'm now getting 2000mps, and no degradation on deep  
>> queues.
>> So, for me at least, problem solved!
>>
>> Chris (author of Bunny I believe?), maybe you can shed some light  
>> on something I'm doing wrong with how I'm using Bunny?
>>
>> Ash
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090908/e642a65d/attachment.htm 


More information about the rabbitmq-discuss mailing list