Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 35118 invoked from network); 20 May 2010 20:17:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 May 2010 20:17:26 -0000 Received: (qmail 47486 invoked by uid 500); 20 May 2010 20:17:26 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 47467 invoked by uid 500); 20 May 2010 20:17:26 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 47459 invoked by uid 99); 20 May 2010 20:17:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 20:17:26 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [69.147.107.20] (HELO mrout1-b.corp.re1.yahoo.com) (69.147.107.20) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 20:17:18 +0000 Received: from SNV-EXBH01.ds.corp.yahoo.com (snv-exbh01.ds.corp.yahoo.com [207.126.227.249]) by mrout1-b.corp.re1.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id o4KKGLNE087014 for ; Thu, 20 May 2010 13:16:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=received:user-agent:date:subject:from:to:message-id: thread-topic:thread-index:in-reply-to:mime-version:content-type: content-transfer-encoding:return-path:x-originalarrivaltime; b=ayTlbob38gVLtS3LMIE3GmbSMO2LebYz5ahadJrbYTUmJjuCsofVhX5hEq69ASdq Received: from SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.86]) by SNV-EXBH01.ds.corp.yahoo.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 20 May 2010 13:16:21 -0700 Received: from 10.72.140.172 ([10.72.140.172]) by SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.84]) via Exchange Front-End Server snv-webmail.corp.yahoo.com ([207.126.227.59]) with Microsoft Exchange Server HTTP-DAV ; Thu, 20 May 2010 20:15:25 +0000 User-Agent: Microsoft-Entourage/12.24.0.100205 Date: Thu, 20 May 2010 12:11:46 -0700 Subject: Re: Zookeeper EventThread and SendThread From: Mahadev Konar To: Message-ID: Thread-Topic: Zookeeper EventThread and SendThread Thread-Index: Acr4UEo8X9hhghgOIkml96RCHYSjLA== In-Reply-To: <1274380205.290129714@192.168.2.231> Mime-version: 1.0 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable X-OriginalArrivalTime: 20 May 2010 20:16:21.0252 (UTC) FILETIME=[50108C40:01CAF859] X-Virus-Checked: Checked by ClamAV on apache.org Hi Nick, These threads are spawned with each zookeeper client handle. As soon as yo= u create a zookeeper client object these threads are spawned. Are yu creating too many zookeeper client objects in your application? Htanks mahadev On 5/20/10 11:30 AM, "Nick Bailey" wrote: > Hey guys, >=20 > Question regarding zookeeper's EventThread and SendThread. I'm not quite = sure > what these are used for but a stacktrace of our client application contai= ns > lines similar to >=20 > "pool-2-thread-20-EventThread" daemon prio=3D10 tid=3D0x00002aac3cb29c00 nid=3D= 0x75d > waiting on condition [0x000000006b080000..0x000000006b080b10] > =A0 java.lang.Thread.State: WAITING (parking) > =A0 =A0 =A0 =A0at sun.misc.Unsafe.park(Native Method) > =A0 =A0 =A0 =A0- parking to wait for =A0<0x00002aab1f577250> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > =A0 =A0 =A0 =A0at java.util.concurrent.locks.LockSupport.park(LockSupport.java:1= 58) > =A0 =A0 =A0 =A0at=20 > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awa= it(Ab > stractQueuedSynchronizer.java:1925) > =A0 =A0 =A0 =A0at=20 > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:35= 8) > =A0 =A0 =A0 =A0at=20 > org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:414) >=20 > "pool-2-thread-20-SendThread" daemon prio=3D10 tid=3D0x00002aac3c35d400 nid=3D0= x75c > runnable [0x0000000070ede000..0x0000000070edeb90] > =A0 java.lang.Thread.State: RUNNABLE > =A0 =A0 =A0 =A0at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) > =A0 =A0 =A0 =A0at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:215) > =A0 =A0 =A0 =A0at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:6= 5) > =A0 =A0 =A0 =A0at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69) > =A0 =A0 =A0 =A0- locked <0x00002aab1f571d08> (a sun.nio.ch.Util$1) > =A0 =A0 =A0 =A0- locked <0x00002aab1f571cf0> (a > java.util.Collections$UnmodifiableSet) > =A0 =A0 =A0 =A0- locked <0x00002aab1f5715b8> (a sun.nio.ch.EPollSelectorImpl) > =A0 =A0 =A0 =A0at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80) > =A0 =A0 =A0 =A0at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java= :921) >=20 > There are pairs of threads ranging from thread-1 to thread-50 and also > multiple pairs of these threads. =A0As in pool-2-thread-20-SendThread is th= e > name of multiple threads in the trace. =A0I'm debugging some load issues wi= th > our system and am suspicious that the large amount of zookeeper threads i= s > contributing. Would anyone be able to elaborate on the purpose of these > threads and how they are spawned? >=20 > Thanks, >=20 > Nick Bailey > Rackspace Hosting > Software Developer, Email & Apps > nicholas.bailey@rackspace.com >=20