On Fri, 2011-07-15 at 11:27 -0400, Bill Speirs wrote: > Digging a bit deeper. I captured the execute time for JRE, Client4, > and Netty and made the following graph. As can be clearly seen, both > JRE and Client4 spend all of their time (sometimes as long as 6 > seconds) on the initial 100 requests (or one per thread).
This can be expected. 100 concurrent threads simultaneously try to open 100 connections which is a costly operation. Once connections are up and running the request per second ratio becomes normal. > Whereas > Netty is flat across all requests. (Also, it doesn't look like Netty > runs concurrently.) > In my tests HttpClient 4.1 greatly outperforms Ning async HTTP client which is based on Netty. > What is the up-front costs for Client4? How can I off-load that time? > Just make sure that 100 threads to do not attempt to obtain a connection from the connection pool all at the same time or make sure the benchmark runs long enough to make 100 first requests not so important. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
