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: Thread Contention (due to use of proxys) in HttpClient 4.3
Date Thu, 15 May 2014 13:34:41 GMT
On Thu, 2014-05-15 at 01:10 +0100, Daniel Feist wrote:
> > I re-ran the benchmark (r1594594) on my computer and unsurprisingly (for
> > me) HC 4.3 comfortably outperformed HC 3.1.
> 
> Yes I see the same running this revision.  The difference is you are testing:
> 
> HttpClient31 vs. HttpClients.createMinimal(mgr)
> 
> and I was testing
> 
> HttpClient31 vs.
> HttpClient.custom().setMgr(mgr).disableEverything(true).build().
> 
> For some reason the HttpClient built by HttpClientBuilder, even when
> everything is turned is not only slower than minimalClient (to be
> expected) but also slower than DefaultHttpClient in previous versions.
>  Not a major difference, but definitely the inverse of what of whats
> in the results you sent.
> 

I am sorry I cannot reproduce it. I replaced HC in minimal configuration
with this

---
final RequestConfig requestConfig = RequestConfig.custom()
        .setStaleConnectionCheckEnabled(false)
        .setExpectContinueEnabled(false)
        .build();
this.httpclient = HttpClients.custom()
        .setConnectionManager(this.mgr)
        .disableContentCompression()
        .setDefaultRequestConfig(requestConfig)
        .build();
---

and still had HC 4.3 outperforming HC 3.1

Oleg

---
oleg@ubuntu:~/src/apache.org/httpcomponents/httpclient-benchmark$ gr
benchmark
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:benchmark
=================================
HTTP agent: Apache HttpClient 3.1
---------------------------------
1000000 POST requests
---------------------------------
Document URI:  http://localhost:35116/echo
Document Length:	2048 bytes

Concurrency level:	50
Time taken for tests:	58.16 seconds
Complete requests:	1000000
Failed requests:	0
Content transferred:	2048000000 bytes
Requests per second:	17193.947 [#/sec] (mean)
---------------------------------
=================================
HTTP agent: Apache HttpClient (ver: 4.3.3)
---------------------------------
1000000 POST requests
---------------------------------
Document URI:		http://localhost:53174/echo
Document Length:	2048 bytes

Concurrency level:	50
Time taken for tests:	53.31 seconds
Complete requests:	1000000
Failed requests:	0
Content transferred:	2048000000 bytes
Requests per second:	18758.207 [#/sec] (mean)
---------------------------------

BUILD SUCCESSFUL
 



---------------------------------------------------------------------
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