Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77AD611EE9 for ; Wed, 10 Sep 2014 12:59:28 +0000 (UTC) Received: (qmail 88684 invoked by uid 500); 10 Sep 2014 12:59:28 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 88641 invoked by uid 500); 10 Sep 2014 12:59:28 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 88630 invoked by uid 99); 10 Sep 2014 12:59:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2014 12:59:28 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [5.148.180.21] (HELO kalnich2.nine.ch) (5.148.180.21) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2014 12:59:21 +0000 Received: from [10.0.0.6] (11-23.107-92.cust.bluewin.ch [92.107.23.11]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by kalnich2.nine.ch (Postfix) with ESMTPSA id C7CC516012B for ; Wed, 10 Sep 2014 12:58:57 +0000 (UTC) Message-ID: <1410353938.21468.2.camel@ubuntu> Subject: Re: High server load due to SessionOutputBufferImpl.flush() From: Oleg Kalnichevski To: HttpComponents Project Date: Wed, 10 Sep 2014 14:58:58 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Wed, 2014-09-10 at 13:59 +0200, Tobias Bieniek wrote: > Hi guys, > > we are running httpcore-nio on several production servers as an API > frontend. Lately we upgraded httpcore from v4.2 to v4.3.2 and since > then we are experiencing a much higher CPU load (constantly around > 40%) and memory usage. > > We have activated JMX on the servers, had a look with VisualVM and > noticed that the Sampler shows SessionOutputBufferImpl.flush() to > consume over 90% of the CPU time. So far we haven't been able to track > why it is spending so much time flushing when the HTTP request load is > actually rather low. > > The memory graph in VisualVM shows that a lot of memory is allocated > in what we suspect to be an endless loop somewhere, which would also > explain the high CPU load. > > As I said above we haven't been successful in debugging this problem > and we would be very thankful for any ideas on how we could solve > this. > > Tobias Bieniek > Hi Tobias If any of the sessions is 'spinning' it should be fairly easy to find out by using I/O session logging. Can you add those (or similar) classes to your test project [1] and reproduce the problem with I/O session logging turned on? Oleg [1] http://svn.apache.org/repos/asf/httpcomponents/contrib/httpcore/trunk/src/main/java/org/apache/http/contrib/logging/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org