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 309B097A3 for ; Thu, 9 Feb 2012 18:21:29 +0000 (UTC) Received: (qmail 22376 invoked by uid 500); 9 Feb 2012 18:21:28 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 22329 invoked by uid 500); 9 Feb 2012 18:21:27 -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 22321 invoked by uid 99); 9 Feb 2012 18:21:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 18:21:27 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.82.170] (HELO mail-we0-f170.google.com) (74.125.82.170) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 18:21:23 +0000 Received: by werm1 with SMTP id m1so1461616wer.15 for ; Thu, 09 Feb 2012 10:21:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.131.234 with SMTP id m84mr1399496wei.24.1328811432402; Thu, 09 Feb 2012 10:17:12 -0800 (PST) Received: by 10.227.60.70 with HTTP; Thu, 9 Feb 2012 10:17:12 -0800 (PST) In-Reply-To: References: Date: Thu, 9 Feb 2012 10:17:12 -0800 Message-ID: Subject: Re: ZooKeeper Memory Usage From: Mahadev Konar To: user@zookeeper.apache.org Cc: Mike Schilli Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkty/pWahqhQSkEyHjnsUiy0ZrdInvuaWlo+Xv//6Utr72qgddjAVq89U8/UMR5HADfHWC7 This is interesting and important. Cesar, what jvm options are you running with? Can you the options in: https://cwiki.apache.org/confluence/display/ZOOKEEPER/Troubleshooting Atleast get the GC logs that we can look at? This will be very interesting. mahadev 2012/2/9 C=E9sar =C1lvarez N=FA=F1ez : > In my case, our stress test show up a linear increase of "tenured memory" > from 0 to > 3GiB with ZK 3.4.0 whereas the same stress-test with 3.3.3 > keeps "tenured memory" stable and < 10MiB. > > The stress test performs many zNodes creation and delete but the overall = zk > usage at any moment in time was relative small. > > BR, > /C=E9sar. > > On Thu, Feb 9, 2012 at 3:14 PM, Camille Fournier wro= te: > >> This is really a question about how the jvm grows its heaps and resizes >> them. If the jvm cannot allocate enough memory for the process because y= ou >> didn't set the max memory high enough, it will fall over. Zookeeper keep= s >> its entire state in memory for performance reasons, if it were to swap t= hat >> would be quite bad for performance. >> >> C >> On Feb 8, 2012 8:23 PM, "Mike Schilli" wrote: >> >> > We've got a ZooKeeper instance that's using about 5 GB of resident >> > memory. Every time we restart it, it starts at 200MB, and then grows >> > slowly until it is back at 5 GB. >> > >> > The large footprint is related to how much data we've got in there. >> > What's interesting, though, is that the process size doesn't shrink if >> > we purge some of the data. >> > >> > Now, this isn't a big problem, I'm just curious if the process will fa= ll >> > over at some point if it can't get more memory or if it'll just make d= ue >> > by caching less data. >> > >> > Also, if I remember correctly, there's a configuration variable to set >> > the maximum size, what happens if ZK reaches that? >> > >> > -- -- Mike >> > >> > Mike Schilli >> > m@perlmeister.com >> > >> --=20 Mahadev Konar Hortonworks Inc. http://hortonworks.com/