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 39BD7179A8 for ; Fri, 24 Apr 2015 18:09:45 +0000 (UTC) Received: (qmail 91623 invoked by uid 500); 24 Apr 2015 18:09:42 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 91589 invoked by uid 500); 24 Apr 2015 18:09:42 -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 91576 invoked by uid 99); 24 Apr 2015 18:09:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 18:09:42 +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: message received from 54.191.145.13 which is an MX secondary for user@zookeeper.apache.org) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 18:09:33 +0000 Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id B835D2054A for ; Fri, 24 Apr 2015 18:09:13 +0000 (UTC) Received: by wiax7 with SMTP id x7so40489591wia.0 for ; Fri, 24 Apr 2015 11:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:mime-version:subject :message-id:date:references:in-reply-to:to; bh=oBffMxyB6DWd5/TzboQbalyq/ounAvUbSkSrp4pou90=; b=SuAAAmo2119xgA2VOXwi8wQDjlgkIIehPz6FW1neJL9x/JDWYQp2MK6O/czEcTE02n qDq1hxB6F9IOTHq/+tWhD5+53GOkBa0p9HakBDX9Y2r9aMBg5iq2UDaOyYU217zIwa8C 2jGiOUqRsplDAeRucHGIplEOOASegAhNWFt/TGXv86Ef7sB/2Ua+8YR0KOdlN8SnMemv htnA1ckPAry6IYlK5yxO+fzw2mr1SWpZT/MeS9nBkvzgy+o2h+E9xd536qJmvN3DMiVv WoWbIQrt3piOxqKQvD1an+LArERsu3dae9jS1V2kBYwtNBnH/v1RaR7F0nT6rz/zMZtX ZC7w== X-Received: by 10.180.88.99 with SMTP id bf3mr2790546wib.75.1429898952427; Fri, 24 Apr 2015 11:09:12 -0700 (PDT) Received: from [192.168.0.20] (cpc11-hitc6-2-0-cust29.9-2.cable.virginm.net. [86.27.129.30]) by mx.google.com with ESMTPSA id gy8sm110651wib.13.2015.04.24.11.09.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Apr 2015 11:09:11 -0700 (PDT) From: Karol Dudzinski Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: OutOfMemory Error Message-Id: Date: Fri, 24 Apr 2015 19:09:10 +0100 References: In-Reply-To: To: "user@zookeeper.apache.org" X-Mailer: iPhone Mail (12D508) X-Virus-Checked: Checked by ClamAV on apache.org Hi, Do you know if any of the services that use your ZK create ACLs that are pot= entially unique and one-time-ish? I recently hit a similar problem and disc= overed that the DataTree has an ACL cache that never gets anything removed f= rom it. That was by far and away the largest memory consumer I found when a= nalysing the heap dump. If this is the case then you should see lots of ACL= objects on the heap. I filed a JIRA for this and keep meaning to submit a patch but sadly haven't= got round to it. As an interim solution, I wrote a tool which uses the Dat= aTree class and the serialisation utils to purge this cache of unused entrie= s. I my case it shrank the snapshot from 500MB to 12MB! The time to write t= he snapshot went from 40 seconds to less than 1 second as a result. Thanks, Karol > On 24 Apr 2015, at 18:45, CP Mishra wrote: >=20 > Hi, >=20 > I am running a 3 node ZK ensemble on 3 VMs (2 CPU, 32GB RAM) in the test > environment. Lately, I have been getting OutOfMemoryError on all three ZK > nodes. ZK has been configured with 6GB heap size. The same ZK ensemble is > shared between Kafka, HDFS HA and another custom service. >=20 > I analyzed the heap dump and 5.8+ GB is being used by DataTree. I don't > have a purge policy in place and size of ZK data directory stands at ~14 G= B > now. There is enough space on the disk holding ZK data (20% used). >=20 > As soon as I restart a ZK node, it grows to use all 6GB and starts Full GC= > every 1-2 sec. In 3-5 minutes, it throws OOM: GC Overhead exceeded. >=20 > I would appreciate any help in diagnosing the issue. >=20 > Thanks, > CP Mishra