[rabbitmq-discuss] Throughput observation with RabbitMQ-3.1.3 and Erlang R16B01 - Single Node and Cluster Node

Priyanki Vashi vashi.priyanki at gmail.com
Thu Aug 15 10:44:53 BST 2013


Hi Again,

After all the above suggestions, I again try to do my tests with eye on
disk usage, RAM usage and network bandwidth utilization. This has now lead
to many more questions so could anyone please throw some light on them.

1) I have a quite high bandwidth between my client (producer & receiver)
and server. Its around 9.2 Gbps. I have confirmed this by running iperf
utility. But the maximum bandwidth I can reach is only 160 mbps. (I have
pika client and single rabbitmq DISK type)

2) I then also took network traces using wireshark, and what I observed
that the AMQP overhead was quite high then the actual payload. If I send
100 bytes of string then overhead is 300 bytes so for every message of 100
bytes I end up sending 400 bytes on wire.

Since I have publish confirm/ack enabled so I understand part of this but
there is also content header and some overhead in content body as well.
Is this standard for most of the clients or its specific for pika-clients
only ?

3) I then also try to observer how my system resources are used. I am new
to this but after some googling I learnt a linux command 'dstat -dmnsy'.
This provides me disk usage, RAM usage, interrupts and context switches,
network send/recev. What I observer that as I increase no of
producer/receiver, compare to DISK and RAM usage, its interrupts and
context switches, which increases rapidly.

what does this really mean ?

4) Also, after certain point the value under network send/receive field
remains constant. Not sure what does this mean also ?

I am pasting here one of the observed sample from dstat.

   mq10 at mqserver10:~$ sudo rabbitmqadmin list queues vhost name node
messages message_stats.publish_details.rate
+-------+------+-----------------+----------+------------------------------------+
| vhost | name |      node       | messages |
message_stats.publish_details.rate |
+-------+------+-----------------+----------+------------------------------------+
| /     | 1    | Moon at mqserver10 | 5        | 3380.4
      |
| /     | 2    | Moon at mqserver10 | 3        | 3649.0
      |
| /     | 3    | Moon at mqserver10 | 6        | 3402.4
      |
| /     | 4    | Moon at mqserver10 | 2        | 3450.8
      |
| /     | 5    | Moon at mqserver10 | 3        | 3444.8
      |
+-------+------+-----------------+----------+------------------------------------+
mq10 at mqserver10:~$ dstat -dmnsy
-dsk/total- ------memory-usage----- -net/total- ----swap--- ---system--
 read  writ| used  buff  cach  free| recv  send| used  free| int   csw
 100k 8974B| 188M 25.7M  115M 9674M|   0     0 |   0     0 |  15k 9759
   0    16k| 189M 25.7M  115M 9673M|6363k 4615k|   0     0 |  22k 6590
   0     0 | 189M 25.7M  115M 9673M|6666k 4847k|   0     0 |  22k 7846
   0     0 | 189M 25.7M  115M 9673M|6293k 4500k|   0     0 |  21k 7518
   0     0 | 189M 25.7M  115M 9674M|7049k 5121k|   0     0 |  22k 5936
   0     0 | 188M 25.7M  115M 9674M|6947k 5081k|   0     0 |  23k 6309
   0     0 | 188M 25.7M  115M 9674M|6387k 4741k|   0     0 |  22k 7020
   0     0 | 188M 25.7M  115M 9674M|6482k 4739k|   0     0 |  22k 7094
   0     0 | 189M 25.7M  115M 9673M|5642k 3976k|   0     0 |  18k 7586
   0     0 | 189M 25.7M  115M 9673M|6246k 4487k|   0     0 |  21k 7497
   0     0 | 189M 25.7M  115M 9673M|6631k 4827k|   0     0 |  21k 5924
   0     0 | 189M 25.7M  115M 9673M|6615k 4722k|   0     0 |  21k 5448
   0     0 | 190M 25.7M  115M 9672M|5677k 4051k|   0     0 |  20k 5757
   0     0 | 190M 25.7M  115M 9672M|6007k 4284k|   0     0 |  20k 6581
   0     0 | 190M 25.7M  115M 9672M|6983k 5052k|   0     0 |  23k 5704
   0     0 | 190M 25.7M  115M 9672M|6318k 4539k|   0     0 |  22k 6208
   0     0 | 190M 25.7M  115M 9672M|6769k 4862k|   0     0 |  23k 5952
   0     0 | 189M 25.7M  115M 9673M|6334k 4586k|   0     0 |  22k 6518
   0     0 | 191M 25.7M  115M 9671M|7019k 5089k|   0     0 |  23k 5937 ^C


   mq10 at mqserver10:~$ sudo rabbitmqadmin list queues vhost name node
messages message_stats.publish_details.rate
+-------+------+-----------------+----------+------------------------------------+
| vhost | name |      node       | messages |
message_stats.publish_details.rate |
+-------+------+-----------------+----------+------------------------------------+
| /     | 1    | Moon at mqserver10 | 3        | 2846.8
      |
| /     | 2    | Moon at mqserver10 | 6        | 2894.2
      |
| /     | 3    | Moon at mqserver10 | 5        | 2950.2
      |
| /     | 4    | Moon at mqserver10 | 3        | 2931.8
      |
| /     | 5    | Moon at mqserver10 | 6        | 2788.2
      |
| /     | 6    | Moon at mqserver10 | 7        | 3008.2
      |
+-------+------+-----------------+----------+------------------------------------+
mq10 at mqserver10:~$ dstat -dmnsy
-dsk/total- ------memory-usage----- -net/total- ----swap--- ---system--
 read  writ| used  buff  cach  free| recv  send| used  free| int   csw
  90k 8095B| 189M 25.7M  115M 9673M|   0     0 |   0     0 |  16k 9394
   0     0 | 190M 25.7M  115M 9672M|6893k 4967k|   0     0 |  24k 6852
   0     0 | 192M 25.7M  115M 9670M|5171k 3601k|   0     0 |  19k 4542
   0     0 | 191M 25.7M  115M 9671M|7007k 5107k|   0     0 |  24k 6125
   0     0 | 191M 25.7M  115M 9671M|6684k 4890k|   0     0 |  23k 6508
   0     0 | 191M 25.7M  115M 9671M|6453k 4643k|   0     0 |  23k 6159
   0     0 | 191M 25.7M  115M 9671M|6342k 4549k|   0     0 |  22k 5418
   0     0 | 191M 25.7M  115M 9671M|6284k 4475k|   0     0 |  22k 5698
   0     0 | 190M 25.7M  115M 9672M|6783k 4861k|   0     0 |  23k 5781
   0     0 | 190M 25.7M  115M 9672M|6636k 4707k|   0     0 |  23k 5779
   0     0 | 189M 25.7M  115M 9673M|6807k 4877k|   0     0 |  23k 5590
   0     0 | 189M 25.7M  115M 9673M|6904k 4949k|   0     0 |  24k 5668
   0     0 | 189M 25.7M  115M 9673M|7194k 5134k|   0     0 |  24k 5700
   0     0 | 189M 25.7M  115M 9673M|6727k 4779k|   0     0 |  23k 5259
   0     0 | 189M 25.7M  115M 9673M|7168k 5114k|   0     0 |  25k 5737
   0     0 | 189M 25.7M  115M 9673M|6943k 5046k|   0     0 |  23k 5646
   0     0 | 189M 25.7M  115M 9674M|6869k 4929k|   0     0 |  23k 5777
   0     0 | 188M 25.7M  115M 9674M|7037k 5044k|   0     0 |  23k 5586
   0     0 | 188M 25.7M  115M 9674M|6999k 5031k|   0     0 |  23k 5730
   0     0 | 189M 25.7M  115M 9673M|6599k 4742k|   0     0 |  22k 6504
   0     0 | 190M 25.7M  115M 9672M|6615k 4834k|   0     0 |  23k 6436
   0     0 | 190M 25.7M  115M 9672M|6595k 4742k|   0     0 |  23k 5795


Also, what is the good profiler to run for rabbitmq server ?

I really want to get hold of how the system resources are used and what is
the bottleneck so may be profiler is a good idea.

Please suggest.

Best Regards,
Priyanki.





On Thu, Aug 1, 2013 at 9:27 PM, Michael Klishin <mklishin at gopivotal.com>wrote:

> Priyanki Vashi:
>
> > 1) Why there is no linear increase in throughput with DISK type of node
> as it's seen with RAM type of node ?
>
> Because disks are much slower than RAM and performing multiple I/O
> operations in parallel often won't yield
> linear increase in I/O throughput (depends on your disks and how they are
> set up; try with a striping array of SSDs ;))
>
> With RAM access, it is more likely that you will see nearly linear
> increase.
>
> > 3) What can be done to improve throughput in both the Tests ?
>
> It's hard to give you good advice without seeing the code.
>
> > 4) Since I have VM with 20 cores dedicated for rabbitMQ execution, how
> can I load the CPU to it's limit ? with the current tests I can load CPU
> maximum to 800% with    above mentioned throughput. currently the limiting
> factor seems to be server latency so how to overcome that ?
>
> I suspect that the limiting factor is disk and network I/O and not CPU.
> If Erlang runtime does not need more cores, it will not use more cores.
>
> Try running iostat or vmstat alongside your benchmarks to see what % of
> load your disk has.
> Monitoring network throughput is another thing to do. Finally, TCP stack
> configuration matters.
> For example, does Pika disable Nagle's algorithm [1] on the sockets it
> uses? I'm not sure.
>
> 1.
> http://boundary.com/blog/2012/05/02/know-a-delay-nagles-algorithm-and-you
> --
> MK
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130815/d67e42c9/attachment.htm>


More information about the rabbitmq-discuss mailing list