Double check the code calculating your numbers. How and when do you start counting messages and time? The JVM warm up a lot faster than your numbers.<div><br></div><div>Rgds,</div><div>Arvid<br><div><br><div class="gmail_quote">
On Thu, Oct 27, 2011 at 10:28 PM, Norman Maurer <span dir="ltr">&lt;<a href="mailto:norman.maurer@googlemail.com">norman.maurer@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Also it would help if you could show us your code ;)<br>
<br>
Bye,<br>
Norman<br>
<br>
<br>
2011/10/27 Norman Maurer &lt;<a href="mailto:norman.maurer@googlemail.com">norman.maurer@googlemail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Also netty use a pool for the buffers. I&#39;m not remember at the moment<br>
&gt; if its &quot;populated&quot; in a lazy fashion or not.<br>
&gt;<br>
&gt; Bye,<br>
&gt; Norman<br>
&gt;<br>
&gt;<br>
&gt; 2011/10/27 John D. Mitchell &lt;<a href="mailto:jdmitchell@gmail.com">jdmitchell@gmail.com</a>&gt;:<br>
&gt;&gt; Just to be clear, that doesn&#39;t fully explain what the OP is seeing. Typically, I see things warmed up on the hot paths in the 10K-100K iterations through that path. The OP is sending 10MM messages so just jvm warm up issues wouldn&#39;t explain the performance curve that they are seeing.<br>

&gt;&gt;<br>
&gt;&gt; John<br>
&gt;&gt;<br>
&gt;&gt; On Oct 27, 2011, at 13:20 , Norman Maurer wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Exactly... The JVM needs some warmup for best performance.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Bye,<br>
&gt;&gt;&gt; Norman<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2011/10/27 John D. Mitchell &lt;<a href="mailto:jdmitchell@gmail.com">jdmitchell@gmail.com</a>&gt;:<br>
&gt;&gt;&gt;&gt; There&#39;s the JVM dynamic compilation / optimization stages and things like the TCP slow-start.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; The only way to get over the JVM start up is to run your code for awhile. Given the number of messages you&#39;re sending, I think you&#39;re doing plenty to warm that part up.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; TCP issues are done on a per-connection basis so there&#39;s not a lot you can do there unless you can control the settings of the machines on both ends and the routers in between. But at least you can tweak the various settings on the server that your netty code is running on. Alas, there are lots of tradeoffs in this so there&#39;s not a simplistic one-size-fits-all answer.<br>

&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Hope this helps,<br>
&gt;&gt;&gt;&gt; John<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Oct 27, 2011, at 11:34 , zx spectrum wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; When I send / receive 10,000,000 messages to try to measure the rate, I see that Netty spends some time to warm up:<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 64800 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 106016 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 143905 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 177714 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 203981 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 228632 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 252397 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 272507 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 291819 messages/s<br>
&gt;&gt;&gt;&gt;&gt;    consuming rate: 309933 messages/s<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; This is the average rate of the messages ( that pass through FrameDecoder ) received per each million.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Can anybody explain why it happens? And how to eliminate a &quot;warm up&quot; stage?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Thank you!!<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; netty-users mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; netty-users mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; netty-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; netty-users mailing list<br>
&gt;&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
&gt;&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
netty-users mailing list<br>
<a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
</div></div></blockquote></div><br></div></div>