[rabbitmq-discuss] Optimizing RabbitMQ
Tom Wrigglesworth
tadw99 at googlemail.com
Wed Aug 15 14:59:30 BST 2012
Hi, Thanks for your reply.
So is the 40ms the time it takes for a message to travel from the game
> logic server to the web browser?
It's the time between the message being published and the message being
delivered. I have output from wireshark looking something similar to:
# Time From To
Protocol Length Info
...
155 1.539600 127.0.0.1 127.0.0.1 AMQP
115 Basic.Publish
157 1.579834 127.0.0.1 127.0.0.1 AMQP
3873 Content-Header Content-Body
159 1.580942 127.0.0.1 127.0.0.1 AMQP
3963 Basic-Deliver Content-Header Content-Body
160 1.590769 127.0.0.1 127.0.0.1 AMQP
115 Basic.Publish
162 1.627732 127.0.0.1 127.0.0.1 AMQP
3873 Content-Header Content-Body
164 1.628295 127.0.0.1 127.0.0.1 AMQP
3963 Basic-Deliver Content-Header Content-Body
165 1.638748 127.0.0.1 127.0.0.1 AMQP
115 Basic.Publish
167 1.675834 127.0.0.1 127.0.0.1 AMQP
3873 Content-Header Content-Body
169 1.676850 127.0.0.1 127.0.0.1 AMQP
3963 Basic-Deliver Content-Header Content-Body
...
This looks to me like it is AMQP that is taking about 40ms between publish
and deliver. Is this because of certain server settings i'm running,
interference from the node server running at the same time on the same
machine or some other reason?
Thank you for your time.
Tom.
On 15 August 2012 12:18, Matthias Radestock <matthias at rabbitmq.com> wrote:
> To,
>
>
> On 15/08/12 12:07, Emile Joubert wrote:
>
>> On 14/08/12 21:32, Tom Wrigg wrote:
>>
>>> Is there a way to turn off acknowledgements? would this make things
>>> faster?
>>>
>>
>> Yes, you can consume in auto-ack mode. Or you can impact performance
>> much less and get the advantages of acknowledgements if you acknowledge
>> messages in batches.
>>
>> Are there any other methods I could use to increase speed/ reduce
>>> latency?
>>>
>>
>> Here are some suggestions, which you should benchmark with your own
>> workload.
>> [snip]
>>
>
> Actually, if you are seeing 40ms latency it is very, very unlikely that
> the RabbitMQ broker is responsible for most of that.
>
> Game Logic server ---> AMQP topic exchange ---> websockets --->
>>> web-browser.
>>>
>>
> So is the 40ms the time it takes for a message to travel from the game
> logic server to the web browser? If so I suggest you measure the latency at
> each step. It could easily be that the bulk of the 40ms is simply network
> latency between your node instance and the web browser, or between node and
> the broker. Or it could be that node/node-amqp are slow.
>
> Why is it taking so long to route a message? I've read of servers
>> doing 12,000+ messages per second.
>>
>
> A lot more than that, actually - see http://www.rabbitmq.com/blog/**
> 2012/04/25/rabbitmq-**performance-measurements-part-**2/<http://www.rabbitmq.com/blog/2012/04/25/rabbitmq-performance-measurements-part-2/>.
> However, you are confusing latency with throughput. High throughput is
> still possible in situations when there is high latency, as long as
> synchronous operations are avoided. High prefetch limits or even using
> no-ack are one way to achieve that on the consuming side.
>
> Regards,
>
> Matthias.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120815/56d73d7e/attachment.htm>
More information about the rabbitmq-discuss
mailing list