hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpClient Performance Issues
Date Fri, 15 Jul 2011 16:41:14 GMT
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. 


To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message