You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Oleg Kalnichevski <ol...@apache.org> on 2003/07/27 14:24:27 UTC
[RELEASE STOPPER] 2.0rc1 is no-go due to a serious performance
issue
Folks,
Sadly enough, I have to confirm the performance problem reported by Todd
Wolff <tw...@austin.rr.com>. HttpClient's performance as of 2.0 beta-1
degraded almost four-fold compared to 2.0 alpha-3. The problem is fairly
easy to reproduce:
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;
public class Test {
public static void main(String args[]) throws Exception {
HttpClient httpclient = new HttpClient();
long s = 0;
for (int i = 0; i < 200; i ++) {
GetMethod httpget = new GetMethod(
"http://localhost:8080/httpclienttest/body");
long start = System.currentTimeMillis();
httpclient.executeMethod(httpget);
long end = System.currentTimeMillis();
long duration = end - start;
System.out.println("Execution time in ms: " + duration);
s += duration;
}
System.out.println("Average: " + (s / 200));
}
On my system I get average response time of 5ms with 2.0a3 compared to
23ms with 2.0rc1. I have no idea what kind of lunacy we have pulled off
to make that happen. I checked the most obvious suspects:
HttpConnection, wire logs. No solution yet.
Oleg
Re: [RELEASE STOPPER] 2.0rc1 is no-go due to a serious performance
issue
Posted by Michael Becke <be...@u.washington.edu>.
Oleg,
I should have time to take care of these two items tonight. I will let
you know how far I get. You may have to take over if I don't finish
this evening.
Mike
Oleg Kalnichevski wrote:
> All right. I believe the crisis can be declared dealt with. Once
> additional DEBUG log entries for the multi-threaded connection manager
> are introduced and option to disable 'stale' connection check is added,
> we will proceed with the 2.0 Release Candidate 1 release.
>
> Mike,
> I see connection pooling as the area where you command the ultimate
> authority. Do you happen to have time to resolve those two issues
> mentioned above? I'll step in only in case you do not.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>
Re: [RELEASE STOPPER] 2.0rc1 is no-go due to a serious performance issue
Posted by Michael Becke <be...@u.washington.edu>.
Let's try again GZipped.
Mike
Re: [RELEASE STOPPER] 2.0rc1 is no-go due to a serious performance issue
Posted by Michael Becke <be...@u.washington.edu>.
Here's a first shot at these two items. The attached patch adds some
more logging to the MTCM and adds variables to the HttpConnection,
SimpleConnectionManager and MTCM for toggling isStale().
Mike
Re: [RELEASE STOPPER] 2.0rc1 is no-go due to a serious performance
issue
Posted by Oleg Kalnichevski <ol...@apache.org>.
All right. I believe the crisis can be declared dealt with. Once
additional DEBUG log entries for the multi-threaded connection manager
are introduced and option to disable 'stale' connection check is added,
we will proceed with the 2.0 Release Candidate 1 release.
Mike,
I see connection pooling as the area where you command the ultimate
authority. Do you happen to have time to resolve those two issues
mentioned above? I'll step in only in case you do not.
Oleg
Re: [RELEASE STOPPER] 2.0rc1 is no-go due to a serious performance
issue
Posted by Oleg Kalnichevski <ol...@apache.org>.
All right. I have found the culprit. It is our much loved & loathed
(depending upon the circumstances) HttpConnection#isStale(). By making
this method always return false the average response time goes down from
23ms to 6ms using the test app posted below.
Thoughts? suggestions?
Oleg
On Sun, 2003-07-27 at 14:24, Oleg Kalnichevski wrote:
> Folks,
> Sadly enough, I have to confirm the performance problem reported by Todd
> Wolff <tw...@austin.rr.com>. HttpClient's performance as of 2.0 beta-1
> degraded almost four-fold compared to 2.0 alpha-3. The problem is fairly
> easy to reproduce:
>
> import org.apache.commons.httpclient.*;
> import org.apache.commons.httpclient.methods.*;
>
> public class Test {
>
> public static void main(String args[]) throws Exception {
>
> HttpClient httpclient = new HttpClient();
> long s = 0;
> for (int i = 0; i < 200; i ++) {
> GetMethod httpget = new GetMethod(
> "http://localhost:8080/httpclienttest/body");
> long start = System.currentTimeMillis();
> httpclient.executeMethod(httpget);
> long end = System.currentTimeMillis();
> long duration = end - start;
> System.out.println("Execution time in ms: " + duration);
> s += duration;
> }
> System.out.println("Average: " + (s / 200));
> }
>
> On my system I get average response time of 5ms with 2.0a3 compared to
> 23ms with 2.0rc1. I have no idea what kind of lunacy we have pulled off
> to make that happen. I checked the most obvious suspects:
> HttpConnection, wire logs. No solution yet.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>