<br><br><div class="gmail_quote">2012/10/4 Thomas Spycher <span dir="ltr">&lt;<a href="mailto:thomas.spycher@tech.swisssign.com" target="_blank">thomas.spycher@tech.swisssign.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div id=":1i">timeStart = time.time()<br>
<br>
self.rpcchannel.basic_publish(exchange=&#39;&#39;, routing_key=&#39;secureObjects&#39;, properties=pika.BasicProperties(reply_to=self.rpcqueue , correlation_id=self._correlation_id,content_type=&quot;text/plain&quot;,delivery_mode=2), body=serializedObject)<br>


<br>
print time.time() - timeStart</div></blockquote></div><br>This does not measure actual end-to-end throughput, only how fast Pika can push things down the socket.<div>In that case, of course more data will take more time. In fact, Pika may even delay sending the data<br clear="all">

<div>(I am not familiar with its internals but it is event loop-based AFAIR).</div><div><br></div><div>So what you are seeing is most likely Pika&#39;s internal buffer being completely filled once you go above 150K,</div>

<div>in which case it has to do extra work, unlike with tiny messages. The same can be true for buffers in layers below (OS does buffering for network I/O, drivers may do that, etc).</div><div><br></div><div>When benchmarking a messaging system throughput, you need to do it end-to-end, with [at least] 2 machines, a realistic</div>

<div>network link between them and understanding about how exactly your client does publishing.</div><div><br></div><div>TCP settings like Nagle&#39;s algorithm [1] and phenomenons like TCP incast [2] can make a noticeable difference in some cases.</div>

<div><br></div><div>1. <a href="http://boundary.com/blog/2012/05/02/know-a-delay-nagles-algorithm-and-you/">http://boundary.com/blog/2012/05/02/know-a-delay-nagles-algorithm-and-you/</a></div><div>2. <a href="http://www.snookles.com/slf-blog/2012/01/05/tcp-incast-what-is-it/">http://www.snookles.com/slf-blog/2012/01/05/tcp-incast-what-is-it/</a></div>

-- <br>MK<br><br><a href="http://github.com/michaelklishin" target="_blank">http://github.com/michaelklishin</a><br><a href="http://twitter.com/michaelklishin" target="_blank">http://twitter.com/michaelklishin</a><br><br>


</div>