Hi there,<br><br>I dont found any performance issues with OrderedMemoryAwareThreadPoolExecutor yet so I would use it...<br><br>And if you have blocking code you will need it as even if you use  a CachedThreadPool. This is because the numer of IOWorker is fixed.<br>
The default is 2 x num cpu.<br><br>bye<br>norman<br><br>Am Freitag, 23. September 2011 schrieb Vibul Imtarnasan &lt;<a href="mailto:vibuli@gmail.com">vibuli@gmail.com</a>&gt;:<br>&gt; Hi,<br>&gt; I&#39;ve read that the OrderedMemoryAwareThreadPoolExecutor has performance issues (<a href="http://web.archiveorange.com/archive/v/ZVMdIF9d6poqpmuvDOuq">http://web.archiveorange.com/archive/v/ZVMdIF9d6poqpmuvDOuq</a>).<br>
&gt; Also, it did not work for me on my HTTP server when used with compression (<a href="http://www.jboss.org/netty/community#nabble-td6303816">http://www.jboss.org/netty/community#nabble-td6303816</a>).<br>&gt; I am wondering if OrderedMemoryAwareThreadPoolExecutor  is needed if  the boss and worker thread pools are created with Executors.newCachedThreadPool().<br>
&gt; From my reading of the documentation on CachedThreadPool, new threads are created as needed.  Hence, if a database read blocks, wont a new thread be used to handle new incoming requests?<br>&gt; Thanks.<br>&gt; Regards<br>
&gt; Vibul<br>&gt;<br>&gt;<br>&gt; On 22 September 2011 01:32, Norman Maurer &lt;<a href="mailto:norman.maurer@googlemail.com">norman.maurer@googlemail.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; You still need your own handler. The ExecutionHandler just take care<br>
&gt;&gt; to &quot;execute&quot; your handler in a new thread (outside of the io-workers).<br>&gt;&gt;<br>&gt;&gt; Bye,<br>&gt;&gt; Norman<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; 2011/9/21 men10 &lt;<a href="mailto:menimmailim@yahoo.com">menimmailim@yahoo.com</a>&gt;:<br>
&gt;&gt; &gt; Thank you for reply<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; So I guess I should execute querys in Execution<br>&gt;&gt; &gt; Handler(OrderedMemoryAwareThreadPoolExecutor) and if create pool in<br>&gt;&gt; &gt; executionhandler (is it a good idea?) I dont need any other handler right?<br>
&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Norman Maurer-2 wrote:<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; You should add an ExecutionHandler in front of your handler otherwise<br>&gt;&gt; &gt;&gt; you will block the worker thread.<br>
&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Bye,<br>&gt;&gt; &gt;&gt; Norman<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; --<br>&gt;&gt; &gt; View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-with-DB-tp6815567p6816444.html">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-with-DB-tp6815567p6816444.html</a><br>
&gt;&gt; &gt; Sent from the Netty User Group mailing list archive at Nabble.com.<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">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>&gt;&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> &lt;<a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a>&gt;<br>&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a> &lt;<a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a>&gt;<br>
&gt;<br>&gt;