<br><br><div class="gmail_quote">On 19 March 2012 16:27, Simon MacMullen <span dir="ltr">&lt;<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On 16/03/12 17:28, Katerina Roukounaki wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since the RabbitMQ server is an Erlang application, I wanted to see<br>
whether it runs faster as I increase the number of scheduler threads in<br>
the Erlang VM that runs it (+S option of the erl program).<br>
<br>
For this purpose, I wrote a simple benchmark (in Erlang) that spawns P<br>
producer and P consumer processes and creates P queues. The i-th<br>
producer sends M messages to the i-th queue and the i-th consumer waits<br>
to receive them. My benchmark uses native Erlang messaging for sending<br>
and receiving messages.<br>
</blockquote>
<br></div>
So just to be clear: you are using the direct client? Or something else?</blockquote><div><br></div><div>Yes, I&#39;m using the direct client.�</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I attach the results I get when I run the benchmark with P=M=1000 on a<br>
machine with 16 cores and assign 1, 2, �, 16 scheduler threads to the VM<br>
that runs the RabbitMQ server.<br>
<br>
As you can see, things get better up to 6 schedulers, but with 7 or more<br>
schedulers it seems that there is no further speedup.<br>
Do you have any idea why this is happening?<br>
</blockquote>
<br></div>
At a guess: hyperthreading? I assume your machine is 8 physical cores and 16 hyperthreads. In which case the extra cores presented by hyperthreading are presumably not helping much.<br></blockquote><div><br></div><div>No. The machine has 16 physical cores. This is the first reason I had not expected the results I got.</div>

<div>�</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
But I&#39;m not an expert on the Erlang scheduler.<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there some kind of synchronization among the processes that the<br>
RabbitMQ server spawns that explains it or should I look for bugs in my<br>
benchmark?<br>
</blockquote>
<br></div>
All your producer-queue-consumer chains are independent, right? So it&#39;s:<br>
<br>
P1 -&gt; Q1 -&gt; C1<br>
P2 -&gt; Q2 -&gt; C2<br>
<br>
?<br>
<br>
If so then there&#39;s no synchronisation between the processes done by RabbitMQ.<br>
<br></blockquote><div>Exactly. And this is the second reason I had not expected the results I got.</div><div>�</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You might want to play with the other scheduler options. +sbt looks particularly interesting...<br>
<br></blockquote><div><br></div><div>I&#39;ll try that and I&#39;ll come back with fresh results.�</div><div><br></div><div>Thanks,</div><div><br></div><div>Katerina</div><div>�</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Cheers, Simon<span><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, VMware<br>
</font></span></blockquote></div><br>