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 B7859116A4 for ; Wed, 21 May 2014 14:41:00 +0000 (UTC) Received: (qmail 41875 invoked by uid 500); 21 May 2014 14:41:00 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 41834 invoked by uid 500); 21 May 2014 14:41:00 -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 41826 invoked by uid 99); 21 May 2014 14:41:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 14:41:00 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dfeist@gmail.com designates 209.85.215.54 as permitted sender) Received: from [209.85.215.54] (HELO mail-la0-f54.google.com) (209.85.215.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 14:40:56 +0000 Received: by mail-la0-f54.google.com with SMTP id pv20so1629320lab.41 for ; Wed, 21 May 2014 07:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PJot56sbjBQ7DoyEAqBpYuoWMK1lLK+adD2tvkn06Zk=; b=Eb9KXxzvLxgTvEaKb246cV5qVqd30oyI/0atHwIOBpv40ACeydLEWdYzSnxKJ+nYQh bfHPCfJqcnjJypPFu+MTfvD55eZ4p/Y1e4AEH9PA6+Ne1tbO14cIgDrCZG3K8u4Ndh0M gL+z3ZMJCAJQlx3igBgCw0ysVWSh/80V6MsP9yJPwCCC6iTBEVHY4RUvcnFm2w3nwEWp 0L1m/ED25r8tdA4bP7uN7ZY9/L5eBKYNyoTXaGNu8ysXsJCJEds/Wv3jFRsX+ZauQX4W aS3uu2yVeExJ/j/ufZ6o5Usk8ls6osaD/ih/GsRx17v1ZXJbwwNTaVIN1IY8tsvCRC8L 4vIw== MIME-Version: 1.0 X-Received: by 10.112.139.65 with SMTP id qw1mr14572338lbb.25.1400683234628; Wed, 21 May 2014 07:40:34 -0700 (PDT) Received: by 10.114.10.193 with HTTP; Wed, 21 May 2014 07:40:34 -0700 (PDT) In-Reply-To: <1400354144.25068.7.camel@ubuntu> 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> <1400147769.26968.12.camel@ubuntu> <1400354144.25068.7.camel@ubuntu> Date: Wed, 21 May 2014 15:40:34 +0100 Message-ID: Subject: Re: Thread Contention (due to use of proxys) in HttpClient 4.3 From: Daniel Feist To: Oleg Kalnichevski Cc: HttpClient User Discussion Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Here are the results!! Interesting... I reran everything: - Added JVM options to even out garbage collection. - Ran each test for minutes 5 minutes. - Used Jetty SelectChannelConnector, same as you always used. (other one is faster, but less stable). https://docs.google.com/a/mulesoft.com/spreadsheets/d/1j2TCeAQmrkWLZyQfetzmtqmUDaGQBiDAr20hC9gEfYE/edit#gid=590558615 Configurations of httpClient are as you have in svn accept for 4.3.3 (not minimal) which is configured as follows: The non-minimal configuration for 4.3.3 is: final RequestConfig requestConfig = RequestConfig.custom() .setStaleConnectionCheckEnabled(false) .setExpectContinueEnabled(false) .build(); this.httpclient = HttpClients.custom() .setConnectionManager(this.mgr) .disableContentCompression() .setDefaultRequestConfig(requestConfig) .build(); Dan On Sat, May 17, 2014 at 8:15 PM, Oleg Kalnichevski wrote: > On Sat, 2014-05-17 at 00:13 +0100, Daniel Feist wrote: >> > Could you please find out if this difference is consistent regardless of >> > the CPU core number used by the system? >> >> Done, see other email I didn't record all figures, but did run >> multiple times and records differences. >> >> > 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 couldn't imagine a difference but in testing on 32-core with >> BlockingChannelConnector I got: >> >> - 3.1 | 75 K TPS >> - 4.3.3 Minimal / 4.2.6 | 74 K TPS >> - 4.3.3 DefultHttpClient | 72 K TPS >> - 4.3.3 Builder (from your test) | 68 K TPS >> >> The difference is small, but it's an interesting problem, working out >> whats going on. 74 vs 75 is irrelevant, but 68 vs. 75 is bigger. >> >> >> 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. >> >> Not sure you'll see any difference is cpu is constrained. If you do do >> it, I can test on 32-core box for you. >> > > Daniel > > I removed all dynamic proxies and got approximately 10% better > performance with my two CPU core PC. > > Could you please build HttpClient from my private experimental branch at > github and re-run your tests? > > https://github.com/ok2c/httpclient/tree/dyn_proxies > https://github.com/ok2c/httpclient/commit/246095522504ddffe07caf70db4c051fa0d31872 > > Cheers > > Oleg > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org