hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpClient4.0.3 performance problem, much slower than HttpClient3.1?
Date Tue, 28 Dec 2010 10:17:02 GMT
...

> Thanks very much for your quick reply!
> 
> I just did the benchmark test from your email, in the benchmark, the
> number of requests was 10000, but the result seems not satisfying.
> The result data is below:
> 
> [zhangshitao@inc-130-120 http-benchmark]$ ./httpclient4.sh
> http://10.20.130.119/100k.txt 10000
> Server Software:        Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8o
> 
> Document URI:           http://10.20.130.119/100k.txt
> Document Length:        100000 bytes
> 
> Time taken for tests:   30.528 seconds
> Complete requests:      10000
> Failed requests:        0
> Content transferred:    1000000000 bytes
> Requests per second:    327.56815 [#/sec] (mean)
> Time per request:       3.0528 [ms] (mean)
> [zhangshitao@inc-130-120 http-benchmark]$ ./httpclient3.sh
> http://10.20.130.119/100k.txt 10000
> Server Software:        Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8o
> 
> Document URI:           http://10.20.130.119/100k.txt
> Document Length:        100000 bytes
> 
> Time taken for tests:   25.333 seconds
> Complete requests:      10000
> Failed requests:        0
> Content transferred:    1000000000 bytes
> Requests per second:    394.74203 [#/sec] (mean)
> Time per request:       2.5333 [ms] (mean)
> 
> --
> ASC-北京研发部-应用工程部
> 张世涛
> 分机号:73354
> 旺旺:stonecheung2010
> 
> 

If I execute the benchmark with the same parameters I get different
results. HttpCore / HttpClient 4.1 are comfortably faster than any other
HTTP agent in the benchmark including HttpClient 3.1 

Disclaimer: I ran the tests on a lousy single core notebook against
localhost. 

I do not have access to similarly sided servers like those you have used
in your tests, so I cannot verify your numbers. However, knowing HC 3.1
code quite well I simply do not see how possibly it can be faster than
HC 4.0 

If you have any theories please do let me know.

Oleg

---
oleg@ubuntu:~/src/apache.org/httpcomponents/httpclient/httpclient-benchmark$ mvn test -Dhc.benchmark.n-requests=10000
-Dhc.benchmark.content-len=100000
...
[INFO] [exec:java {execution: test-run}]
=================================
HTTP agent: Apache HttpClient 3.1
---------------------------------
10000 GET requests
---------------------------------
Document URI:		http://localhost:56323/rnd?c=100000
Document Length:	100000 bytes

Concurrency level:	100
Time taken for tests:	18.57 seconds
Complete requests:	9999
Failed requests:	1
Content transferred:	999900000 bytes
Requests per second:	538.4491 [#/sec] (mean)
Time per request:	1.8571857 [ms] (mean)
---------------------------------
10000 POST requests
---------------------------------
Document URI:		http://localhost:56323/echo
Document Length:	146544 bytes

Concurrency level:	100
Time taken for tests:	19.22 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1489821168 bytes
Requests per second:	520.2914 [#/sec] (mean)
Time per request:	1.922 [ms] (mean)
---------------------------------
=================================
HTTP agent: JRE HTTP 1.6.0_10
---------------------------------
10000 GET requests
---------------------------------
Document URI:		http://localhost:56323/rnd?c=100000
Document Length:	100000 bytes

Concurrency level:	100
Time taken for tests:	15.221 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1000000000 bytes
Requests per second:	656.98706 [#/sec] (mean)
Time per request:	1.5221 [ms] (mean)
---------------------------------
10000 POST requests
---------------------------------
Document URI:		http://localhost:56323/echo
Document Length:	145256 bytes

Concurrency level:	100
Time taken for tests:	15.579 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1461957416 bytes
Requests per second:	641.8897 [#/sec] (mean)
Time per request:	1.5579 [ms] (mean)
---------------------------------
=================================
HTTP agent: Apache HttpCore 4 (ver: 4.1)
---------------------------------
10000 GET requests
---------------------------------
Document URI:		http://localhost:56323/rnd?c=100000
Document Length:	100000 bytes

Concurrency level:	100
Time taken for tests:	11.061 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1000000000 bytes
Requests per second:	904.0774 [#/sec] (mean)
Time per request:	1.1061 [ms] (mean)
---------------------------------
10000 POST requests
---------------------------------
Document URI:		http://localhost:56323/echo
Document Length:	146704 bytes

Concurrency level:	100
Time taken for tests:	13.893 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1489995840 bytes
Requests per second:	719.787 [#/sec] (mean)
Time per request:	1.3893 [ms] (mean)
---------------------------------
=================================
HTTP agent: Apache HttpClient 4 (ver: 4.1-beta2-SNAPSHOT)
---------------------------------
10000 GET requests
---------------------------------
Document URI:		http://localhost:56323/rnd?c=100000
Document Length:	100000 bytes

Concurrency level:	100
Time taken for tests:	11.844 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1000000000 bytes
Requests per second:	844.3094 [#/sec] (mean)
Time per request:	1.1844 [ms] (mean)
---------------------------------
10000 POST requests
---------------------------------
Document URI:		http://localhost:56323/echo
Document Length:	146704 bytes

Concurrency level:	100
Time taken for tests:	14.31 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1499028464 bytes
Requests per second:	698.812 [#/sec] (mean)
Time per request:	1.431 [ms] (mean)
---------------------------------
=================================
HTTP agent: Jetty 7.2.0.v20101020
---------------------------------
10000 GET requests
---------------------------------
Document URI:		http://localhost:56323/rnd?c=100000
Document Length:	100000 bytes

Concurrency level:	100
Time taken for tests:	18.613 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1000000000 bytes
Requests per second:	537.25885 [#/sec] (mean)
Time per request:	1.8613 [ms] (mean)
---------------------------------
10000 POST requests
---------------------------------
Document URI:		http://localhost:56323/echo
Document Length:	196608 bytes

Concurrency level:	100
Time taken for tests:	24.55 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1844425632 bytes
Requests per second:	407.332 [#/sec] (mean)
Time per request:	2.455 [ms] (mean)
---------------------------------
=================================
HTTP agent: Ning Async HTTP client 1.4.0
---------------------------------
10000 GET requests
---------------------------------
Document URI:		http://localhost:56323/rnd?c=100000
Document Length:	100000 bytes

Concurrency level:	100
Time taken for tests:	17.817 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1000000000 bytes
Requests per second:	561.2617 [#/sec] (mean)
Time per request:	1.7817 [ms] (mean)
---------------------------------
10000 POST requests
---------------------------------
Document URI:		http://localhost:56323/echo
Document Length:	146424 bytes

Concurrency level:	100
Time taken for tests:	26.434 seconds
Complete requests:	10000
Failed requests:	0
Content transferred:	1461602176 bytes
Requests per second:	378.30066 [#/sec] (mean)
Time per request:	2.6434 [ms] (mean)
---------------------------------




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


Mime
View raw message