[rabbitmq-discuss] Java client - 91% time spent in reading the socket?
Tim Robertson
timrobertson100 at gmail.com
Thu Aug 1 18:51:29 BST 2013
Thanks Michael for that super fast reply,
That was what I was actually questioning... across all threads, 91% of the
time is spent in the connection thread and all of it is in reading the
socket which I found somewhat suspicious, knowing how much processing needs
to happen per message. The other 9% is spent in "my code". Is it really
true that it is so time consuming for the connection thread to need 9/10ths
of the time? Also - I'm only seeing 400msg/s (even when I comment out all
my code) from a durable persistent queue with ACK, lending more weight to
my suspicions that something is not quite right here (I have basic QoS at
100msg and a single thread+channel here).
You still think this is correct behavior?
Cheers,
Tim
On Thu, Aug 1, 2013 at 5:02 PM, Michael Klishin <mklishin at gopivotal.com>wrote:
> Tim Robertson:
>
> > Does this look suspicious to anyone? Can anyone shed any light on how
> one might improve this?
>
> Java client uses a separate thread for network activity (called "main
> loop"), one per connection.
>
> So in that thread, 100% of time is spent reading from the socket. When a
> delivery arrives,
> it is dispatched to a work pool (every channel has its own, AFAIR).
>
> If you profile all methods, it's certainly very likely that
> com.rabbitmq.client.impl.AMQConnection$MainLoop.run will be at the top of
> the overall table.
>
> You can try excluding certain classes/methods/threads from the profiler.
> That will
> give you a more informative insight.
> --
> MK
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130801/56ab38d7/attachment.htm>
More information about the rabbitmq-discuss
mailing list