Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4223211E40 for ; Fri, 16 May 2014 23:27:23 +0000 (UTC) Received: (qmail 51983 invoked by uid 500); 16 May 2014 11:45:51 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 36043 invoked by uid 500); 16 May 2014 11:28:38 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 74620 invoked by uid 99); 16 May 2014 11:19:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2014 11:19:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [5.148.180.21] (HELO kalnich2.nine.ch) (5.148.180.21) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2014 09:56:34 +0000 Received: from [192.168.42.101] (unknown [213.55.184.147]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by kalnich2.nine.ch (Postfix) with ESMTPSA id 3C9E7160222 for ; Thu, 15 May 2014 09:56:11 +0000 (UTC) Message-ID: <1400147769.26968.12.camel@ubuntu> Subject: Re: Thread Contention (due to use of proxys) in HttpClient 4.3 From: Oleg Kalnichevski To: HttpClient User Discussion Date: Thu, 15 May 2014 11:56:09 +0200 In-Reply-To: References: <1399895327.15315.4.camel@ubuntu> <1399899042.18400.8.camel@ubuntu> <1399929006.44087.YahooMailNeo@web142804.mail.bf1.yahoo.com> <1399981202.28534.13.camel@ubuntu> <1400080937.15889.4.camel@ubuntu> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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. Could you please find out if this difference is consistent regardless of the CPU core number used by the system? The only viable theory that I have at the moment is for some reason HC 4.3 does not scale well on 4+ CPU core system. I have only very moderate hardware at my disposal. I have never had a chance to test HC performance on a big box with lots of CPUs and therefore may have missed something. > 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. > Honestly, there is really no significant differences between the two I can think of. I cannot completely rule out a possibility of some green men from Mars randomly inserting Thread#sleep() statements but I consider it unlikely. I'll see if I can reproduce the issue locally. > I'm still not seeing a major issue with the contention i mentioned i'd > seen in profiler, be an interesting experiment to test performance > with 500 treads, both with/without proxies though. > I'll give it a shot this weekend. Cheers Oleg > Dan > > > oleg@ubuntu:~/src/apache.org/httpcomponents/httpclient-benchmark$ gr -q > > benchmark > > ================================= > > HTTP agent: Apache HttpClient 3.1 > > --------------------------------- > > 1000000 POST requests > > --------------------------------- > > Document URI: http://localhost:53796/echo > > Document Length: 2048 bytes > > > > Concurrency level: 50 > > Time taken for tests: 64.625 seconds > > Complete requests: 1000000 > > Failed requests: 0 > > Content transferred: 2048000000 bytes > > Requests per second: 15473.888 [#/sec] (mean) > > --------------------------------- > > ================================= > > HTTP agent: Apache HttpClient (ver: 4.3.3) > > --------------------------------- > > 1000000 POST requests > > --------------------------------- > > Document URI: http://localhost:47900/echo > > Document Length: 2048 bytes > > > > Concurrency level: 50 > > Time taken for tests: 55.837 seconds > > Complete requests: 1000000 > > Failed requests: 0 > > Content transferred: 2048000000 bytes > > Requests per second: 17909.271 [#/sec] (mean) > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org