[rabbitmq-discuss] The meaning of latency in the PerfTest module

Rouzbeh Farahmand Rouzbeh.Farahmand at Desire2Learn.com
Mon Apr 21 22:09:54 BST 2014


Hello all,

I have a question regarding the way latency is calculated in the PefTest<http://www.rabbitmq.com/java-tools.html> module. When we say latency (time taken for a sent message to be received)<http://www.rabbitmq.com/blog/2012/04/17/rabbitmq-performance-measurements-part-1/>,

do we mean the time it took for the publisher to put a message to a queue and got an ACK back. ( i.e. latency  = wall-time of sending the message by publisher - wall-time of receiving the ACK by the publisher)

Or

Do we mean the time that it takes to publish a message to a queue and consume the same message from the same queue? . ( i.e. latency  = wall-time of sending the message by publisher - wall-time of receiving by the consumer)

I had a feeling that it must be the former ( because usually the consumer is another party), but my confusion is due to the following scenarios:

When I run the PerfTest like this: One publisher - One Consumer (with publisher confirms), I get the latency calculated for me. So far so good!

D:\abbitmq-java-client-bin-3.3.0> runjava.bat com.rabbitmq.examples.PerfTest -x 1 -y 1 -c 1000
starting consumer #0
starting producer #0
time: 1.000s, sent: 16562 msg/s, confirmed: 16138 msg/s, nacked: 0 msg/s, received: 16137 msg/s, min/avg/max latency: 5246/26151/85175 microseconds

However, when I run this test: one publisher - one consumer (with publisher confirms) with auto-ack set (i.e. no Ack). I still get the latency calculated for me. So the PerfTest could have not possibly calculated the latency based on the time it received the Ack. So does it calculate it based on the time it consumes the message and receives it at its own end?

D:\rabbitmq-java-client-bin-3.3.0> runjava.bat com.rabbitmq.examples.PerfTest -a -x 1 -y 1 -c 1000
starting consumer #0
starting producer #0
time: 1.000s, sent: 18510 msg/s, confirmed: 18074 msg/s, nacked: 0 msg/s, received: 18073 msg/s, min/avg/max latency: 650/20666/44193 microseconds


Whereas here, I have one publisher and no consumer, and I don't get the latency because in this scenario, I have no consumer, so no queue is created, and we don't deliver a message to a queue, and hence we don't have the time of consumption or ack receive ?!

D:\ \rabbitmq-java-client-bin-3.3.0> runjava.bat com.rabbitmq.examples.PerfTest -x 1 -y 0 -c 1000
starting producer #0
time: 1.000s, sent: 47299 msg/s, confirmed: 46835 msg/s, nacked: 0 msg/s


Your help and clarification is much appreciated.

Cheers,
Rouzbeh

[D2L logo]
Rouzbeh Farahmand
Software Developer
Desire2Learn Incorporated
rouzbeh.farahmand at Desire2Learn.com<mailto:rouzbeh.farahmand at Desire2Learn.com>
www.Desire2Learn.com<http://www.desire2learn.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140421/82def5a9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1545 bytes
Desc: image001.png
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140421/82def5a9/attachment.png>


More information about the rabbitmq-discuss mailing list