<div dir="ltr">Sorry for coming back to this thread so much after your reply - Was off on vacation for a week.<div><br></div><div>&gt;�<span style="font-family:arial,sans-serif;font-size:13px">But your ping-pong test is doing the same thing! If it can&#39;t send another message until the previous one has been received, we can&#39;t coalesce together two writes.</span><span style="font-family:arial,sans-serif;font-size:13px">�</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font face="arial, sans-serif">Understood - Back to the original question, in this scenario would you expect each written message to cause approximately four disk writes? Naively, I&#39;d expect it to be closer to two or three writes.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">It&#39;s fine if so - I just want to ensure that our experimental data matches up with your expert opinion on what should be happening.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Thanks much,</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Matt</font></div><div>
<font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 7, 2013 at 3:22 AM, 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 class="im">On 06/08/13 18:42, Matt Pietrek wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The net effect is that messages &#39;ping-pong&#39; between the two ioloop<br>
threads as fast as possible. In the &#39;main&#39; ioloop init, it sends an<br>
initial message to kick things off.<br>
</blockquote>
<br></div>
&lt;snip&gt;<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I also have a global switch (USE_TRANSACTIONS) that lets me switch<br>
between using transactions and not. When set, it adds tx_select() when<br>
opening the channels and tx_commit after publishing messages. For the<br>
tests I was running, I wasn&#39;t using transactions. If I do run with<br>
transactions the numbers are very similar (surprising I know, but I<br>
stepped through the code to verify that the tx_xxx calls are only made<br>
when I intend them to be.)<br>
</blockquote>
<br></div>
Ah, I see. The thing is that transactions are quite lightweight in and of themselves, the reason they tend to slow things down is they form a barrier across which we can&#39;t coalesce writes / have to wait for a synchronous network round trip.<br>

<br>
But your ping-pong test is doing the same thing! If it can&#39;t send another message until the previous one has been received, we can&#39;t coalesce together two writes. And it also ensures there&#39;s only one message on the wire at once.<br>

<br>
Cheers, Simon<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
</div></div></blockquote></div><br></div>