You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Pascal S. de Kloe" <pa...@quies.net> on 2007/10/26 14:46:54 UTC

Performance

A client of mine is having some serious performance problems with the HTTP
client and requested to improve things.

Do you accept patches like the attached one?

* Lazy initialization
* Use indexed ArrayList methods
* Removes the need for CookieIdentityComparator

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


Re: Performance

Posted by "Pascal S. de Kloe" <pa...@quies.net>.
> We are always interested in improvements to our products especially in
> the performance domain. More information about your actual use case that
> causes the problems is also very welcome. Please attach your patches to
> a Jira ticket, so we can review them:
> https://issues.apache.org/jira/

Thank you Ortwin.


https://issues.apache.org/jira/secure/attachment/12368488/HttpState.patch

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


Re: Performance

Posted by Ortwin Glück <od...@odi.ch>.
Pascal S. de Kloe wrote:
> A client of mine is having some serious performance problems with the HTTP
> client and requested to improve things.
> 
> Do you accept patches like the attached one?
> 
> * Lazy initialization
> * Use indexed ArrayList methods
> * Removes the need for CookieIdentityComparator

Pascal,

We are always interested in improvements to our products especially in
the performance domain. More information about your actual use case that
causes the problems is also very welcome. Please attach your patches to
a Jira ticket, so we can review them:
https://issues.apache.org/jira/

Ortwin
-- 
[web]  http://www.odi.ch/
[blog] http://www.odi.ch/weblog/
[pgp]  key 0x81CF3416
       finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416

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


Re: Performance

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2007-10-26 at 15:12 +0200, Pascal S. de Kloe wrote:
> Hello Oleg,
> 
> 
> > (2) Can you give us a little more details regarding the performance
> > problems you have been observing?
> 
> The latencies they are experiencing are somewhere between 37 and 100 ms with 10
> threads doing 100 HTTP GET calls each. However once they move to a 100 threads
> with 1000 calls each the latencies go up from 1500 to 15000 ms!
> 
> I guess this has something to do with the extensive use of synchronized methods?
> 
> 
> > (3) Give us a little more details about your application. At the very
> > least what version of HttpClient is being used.
> 
> The application is a server doing lots of small HTTP GET requests with one of
> the latest 3.x versions.
> 
> > Just for the record, HttpClient 3.x codeline has numerous design issues
> > with its core components but I am not aware of anything that may lead to
> > "some serious performance problems"
> 
> For this server 40 ms is a serious performance problem. That's why I wanted to
> know how much performance tuning you'd like. ;)
> 

Pascal,

Just out of curiosity, do you have the stale connection check disabled,
which is known to cause major performance issues, when misused? 

Oleg


> 
> Thanks for your quick reply.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
> 
> 


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


Re: Performance

Posted by Ortwin Glück <od...@odi.ch>.

Pascal S. de Kloe wrote:
> Hello Oleg,
> 
> 
>> (2) Can you give us a little more details regarding the performance
>> problems you have been observing?
> 
> The latencies they are experiencing are somewhere between 37 and 100 ms with 10
> threads doing 100 HTTP GET calls each. However once they move to a 100 threads
> with 1000 calls each the latencies go up from 1500 to 15000 ms!
> 
> I guess this has something to do with the extensive use of synchronized methods?

I don't believe synchronization can have a big impact. The question is,
what change in latency did you expect. You are doing 100 times more
work. But what kind of work? Are the threads mostly waiting on the
server or are they mostly processing the response stream? So is the
workload CPU, memory, or signal (wait) intensive? Maybe your processing
is just wasting memory and all your VM is doing is GC?

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


Re: Performance

Posted by "Pascal S. de Kloe" <pa...@quies.net>.
Hello Oleg,


> (2) Can you give us a little more details regarding the performance
> problems you have been observing?

The latencies they are experiencing are somewhere between 37 and 100 ms with 10
threads doing 100 HTTP GET calls each. However once they move to a 100 threads
with 1000 calls each the latencies go up from 1500 to 15000 ms!

I guess this has something to do with the extensive use of synchronized methods?


> (3) Give us a little more details about your application. At the very
> least what version of HttpClient is being used.

The application is a server doing lots of small HTTP GET requests with one of
the latest 3.x versions.

> Just for the record, HttpClient 3.x codeline has numerous design issues
> with its core components but I am not aware of anything that may lead to
> "some serious performance problems"

For this server 40 ms is a serious performance problem. That's why I wanted to
know how much performance tuning you'd like. ;)


Thanks for your quick reply.

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


Re: Performance

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2007-10-26 at 14:46 +0200, Pascal S. de Kloe wrote:
> A client of mine is having some serious performance problems with the HTTP
> client and requested to improve things.
> 
> Do you accept patches like the attached one?
> 
> * Lazy initialization
> * Use indexed ArrayList methods
> * Removes the need for CookieIdentityComparator
> 

Pascal,

(1) First off, we _happily_ accept patches
(2) Can you give us a little more details regarding the performance
problems you have been observing? 
(3) Give us a little more details about your application. At the very
least what version of HttpClient is being used.

Just for the record, HttpClient 3.x codeline has numerous design issues
with its core components but I am not aware of anything that may lead to
"some serious performance problems"

Cheers

Oleg


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


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


Re: Performance

Posted by Ortwin Glück <od...@odi.ch>.
Pascal S. de Kloe wrote:
> A client of mine is having some serious performance problems with the HTTP
> client and requested to improve things.
> 
> Do you accept patches like the attached one?
> 
> * Lazy initialization
> * Use indexed ArrayList methods
> * Removes the need for CookieIdentityComparator

Pascal,

Do you have any performance/profiling data to backup the effect of the
changes?

Ortwin




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


Re: Performance [PATCH]

Posted by "Pascal S. de Kloe" <pa...@quies.net>.
And this time with patch...