hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Speirs <bill.spe...@gmail.com>
Subject Re: HttpClient Performance Issues
Date Fri, 15 Jul 2011 19:40:13 GMT
On Fri, Jul 15, 2011 at 2:56 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
> What makes you think the time was wasted inside HttpClient code?

I've re-run the test quite a few times (both with ab and the benchmark
code) and EVERY time it's the first 100 requests. I'm only tracking
the time around the execute() function, so it's coming from something
the client is doing.

> Your computer might have had a sudden urge to swap some data to disk or there
> was a temporary glitch in the Matrix or what not.

Agreed, but whatever glitch is happening in the Matrix is being caused
by my calling execute() 100 times for the first 100 requests.

> The point is as long as there is one such request for a thousand 'normal' ones one outlier
> simply irrelevant.

I don't think it's that easy to say the first ones are simply
irrelevant. In my benchmark they're all irrelevant; however, in
production there will possibly be a human sitting behind that request
(or a 100 in this case) and they will have to wait for 6 seconds
whereas everyone else will only have to wait a ~20ms. If there is a
way for me to do this "setup" before real clients are using it, that
would be acceptable... I'm just not sure how to do that.

> If you are fine with executing requests sequentially simply use one
> thread to execute requests and utilize simple (single-connection)
> connection manager instead of the pooling one.

I will certainly test this out, but will this re-use connections that
are already open? I'm already executing these requests in their own
thread (in my code), but I like the idea of not having to open a new
connection with each request, but being able to re-use existing
connections. This is why I went with the pool... maybe I should
re-consider my design?

> Could be anything or all these factors combined.

So no one else has had this type of an issue? I'll dig further if I have time...



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

View raw message