Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E4A0B10883 for ; Wed, 24 Jul 2013 15:31:26 +0000 (UTC) Received: (qmail 33764 invoked by uid 500); 24 Jul 2013 15:31:25 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 33486 invoked by uid 500); 24 Jul 2013 15:31:20 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 33128 invoked by uid 99); 24 Jul 2013 15:31:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jul 2013 15:31:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of VGlushak@luxoft.com designates 213.208.171.190 as permitted sender) Received: from [213.208.171.190] (HELO msk-edge-02.luxoft.com) (213.208.171.190) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jul 2013 15:31:12 +0000 Received: from MSK-HUBT-03.luxoft.com (172.30.50.89) by msk-edge-02.luxoft.com (172.30.16.190) with Microsoft SMTP Server (TLS) id 14.2.342.3; Wed, 24 Jul 2013 19:30:50 +0400 Received: from DB-HUBT-05.dbdc.luxoft.com (172.30.81.48) by msk-hubt-03.luxoft.com (172.30.50.163) with Microsoft SMTP Server (TLS) id 14.2.342.3; Wed, 24 Jul 2013 19:30:49 +0400 Received: from DB-MBOX-05.dbdc.luxoft.com ([fe80::d1d3:6eed:b30c:8cc9]) by db-hubt-05.dbdc.luxoft.com ([::1]) with mapi id 14.03.0123.003; Wed, 24 Jul 2013 18:30:49 +0300 From: "Glushak, Vladimir" To: "user@zookeeper.apache.org" Subject: HA: High CPU utilization by zookeeper Thread-Topic: High CPU utilization by zookeeper Thread-Index: Ac6H5SPAdaVDTzS1TCK7xqWH1/lCAwABQtRqAApyIQAAG6RuVQ== Date: Wed, 24 Jul 2013 15:30:48 +0000 Message-ID: References: , In-Reply-To: Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.81.14] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Thank you Sergey, maybe that's the reason. Is it possible to get somewhere zookeeper 3.4.6 snapshot or milestone binar= ies that includes those patch? -Vladimir ________________________________________ =EF=D4: Sergey Maslyakov [evolvah@gmail.com] =EF=D4=D0=D2=C1=D7=CC=C5=CE=CF: 24 =C9=C0=CC=D1 2013 =C7. 9:17 =EB=CF=CD=D5: user@zookeeper.apache.org =F4=C5=CD=C1: Re: High CPU utilization by zookeeper I wonder if this has anything to do with the SASL issue in the client: https://issues.apache.org/jira/browse/ZOOKEEPER-1657 Regards, /Sergey On Tue, Jul 23, 2013 at 4:18 PM, Glushak, Vladimir wro= te: > Hello Zookeeper community, > > I've found that our application has issue with high CPU usage. > I've done some profiling and found out that root cause of this issue is > thread responsible for connecting to zookeeper. > After some more investigation, i've found out that my application (one > process) has few separate sessions (clients ) that connect to zookeeper. > I've refactored it and decrease number of sessions to 1. > > The CPU usage decreased. But still thread responsible for interaction wit= h > zoo-server is consuming a lot of resources: > main-SendThread(zoo.addr:zoo.port) > 7,044,378.96 [ms] > 984.896 ms / sec > > > The application is currently in "sleep mode" - it does nothing, but this > thread is really busy. Should it be such? > I've found out that this thread is currently works in infinity loop: > com.db.itrac.router.context.SendThread -> run method, especially < > clientCnxnSocket.doTransport(to, pendingQueue, outgoingQueue); > consum= es > most of resources. > > > To connecting zookeeper I'm using netflix CuratorFramework with default > configuration. Maybe I'm doing smth wrong, please advice? > > > Also I have two questions: > > 1. Should such high CPU consumption thread exists in app? Is it proper > behavior? > 2. Can one application has few separate sessions to zookeeper server? Is > it expected behavior to increase of CPU utilization? > > > ________________________________ > > This e-mail and any attachment(s) are intended only for the recipient(s) > named above and others who have been specifically authorized to receive > them. They may contain confidential information. If you are not the > intended recipient, please do not read this email or its attachment(s). > Furthermore, you are hereby notified that any dissemination, distribution > or copying of this e-mail and any attachment(s) is strictly prohibited. I= f > you have received this e-mail in error, please immediately notify the > sender by replying to this e-mail and then delete this e-mail and any > attachment(s) or copies thereof from your system. Thank you. > ________________________________ This e-mail and any attachment(s) are intended only for the recipient(s) na= med above and others who have been specifically authorized to receive them.= They may contain confidential information. If you are not the intended rec= ipient, please do not read this email or its attachment(s). Furthermore, yo= u are hereby notified that any dissemination, distribution or copying of th= is e-mail and any attachment(s) is strictly prohibited. If you have receive= d this e-mail in error, please immediately notify the sender by replying to= this e-mail and then delete this e-mail and any attachment(s) or copies th= ereof from your system. Thank you.