I&#39;m prototyping a simple application in Netty. In this simple app I&#39;ve tried to simulate slow back-end I/O (such as database calls) through a Thread.sleep().<br>An ExecutionHandler has, together with an OrderedMemoryAwareThreadPoolExecutor been put in the pipeline yet I don&#39;t see the concurrent execution I want.<br>
<br>Used ApacheBench to benchmark. Tried the following ab -n 100 -c 100 <a href="http://127.0.0.1:8080/">http://127.0.0.1:8080/</a> which would do a total of 100 requests simultaneously to the server.<br>I expect this test to finish in about 1 second (as my sleep is 1000 ms) but somehow it&#39;s taking twice as long. Only yielding 50 req/s.<br>
<br>Trying the same ab but with -n 50 -c 50 works as expected, finishes in one second.<br>Feels like somethings up with the thread pools and the execution.<br>Have a legacy server in MINA that do lots of blocking I/O in the &quot;business layer&quot; with no problems. Hopefully it&#39;s just some negligence from my side causing this.<br>
<br>Code is available here <a href="http://gist.github.com/251077">http://gist.github.com/251077</a><br>(It&#39;s fully runnable, but with only one public class) <br><br>Anybody know what&#39;s causing this?<br><br>--<br>
Carl<br>