<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>> <span style="font-family:arial,sans-serif;font-size:13px">But your ping-pong test is doing the same thing! If it can't send another message until the previous one has been received, we can'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'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'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"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></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 'ping-pong' between the two ioloop<br>
threads as fast as possible. In the 'main' ioloop init, it sends an<br>
initial message to kick things off.<br>
</blockquote>
<br></div>
<snip><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'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'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't send another message until the previous one has been received, we can't coalesce together two writes. And it also ensures there'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>