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 217C49332 for ; Fri, 2 Mar 2012 23:18:32 +0000 (UTC) Received: (qmail 63474 invoked by uid 500); 2 Mar 2012 23:18:31 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 63444 invoked by uid 500); 2 Mar 2012 23:18:31 -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 63436 invoked by uid 99); 2 Mar 2012 23:18:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 23:18:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of neha.narkhede@gmail.com designates 209.85.212.42 as permitted sender) Received: from [209.85.212.42] (HELO mail-vw0-f42.google.com) (209.85.212.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 23:18:27 +0000 Received: by vbjk13 with SMTP id k13so1942973vbj.15 for ; Fri, 02 Mar 2012 15:18:06 -0800 (PST) Received-SPF: pass (google.com: domain of neha.narkhede@gmail.com designates 10.52.17.239 as permitted sender) client-ip=10.52.17.239; Authentication-Results: mr.google.com; spf=pass (google.com: domain of neha.narkhede@gmail.com designates 10.52.17.239 as permitted sender) smtp.mail=neha.narkhede@gmail.com; dkim=pass header.i=neha.narkhede@gmail.com Received: from mr.google.com ([10.52.17.239]) by 10.52.17.239 with SMTP id r15mr19879306vdd.95.1330730286156 (num_hops = 1); Fri, 02 Mar 2012 15:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=QIgLiEQAD5ORoiUyOMM2s43nkGr4dcv0j1lYYlvlQFs=; b=dl4KMq043oaekzUskOLAz7ZpUev3TI2VvLfq/Rh6/XMckRGwr3WyLgU9Jlmh1aUwS/ mGNfk31OD8ZBRnkwKKJCuldtx/xX5NANXrrXgn+t7Pv01/kBe/yc+jIiaycRsKDoff1u 8v1Tylnbv2MhbVx6KUojghXhQL0lSfN6jLIdrPS2Y5V0hU6EHJUhB1psTuQfo2sXFQyA 1vclRbzKtto5zdpl6PCmJuAO0Ig+RDPNRG9PvKvr8ssnFt+ZallBQ2fCV2FlcusilMBm GoIzGyBVoLb7ec0nDLKGGOrgimuzWFxIzWFjj1PqzEQU2plouTFBA/QaMiuK0r4M9dZM unGA== MIME-Version: 1.0 Received: by 10.52.17.239 with SMTP id r15mr17016236vdd.95.1330730285851; Fri, 02 Mar 2012 15:18:05 -0800 (PST) Received: by 10.220.97.84 with HTTP; Fri, 2 Mar 2012 15:18:05 -0800 (PST) In-Reply-To: References: Date: Fri, 2 Mar 2012 15:18:05 -0800 Message-ID: Subject: Re: ZooKeeper Memory Usage From: Neha Narkhede To: user@zookeeper.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Was there ever a JIRA created for this issue ? Thanks, Neha On Fri, Feb 10, 2012 at 9:31 AM, Mahadev Konar wr= ote: > Great. You should have the gc logs then. Mind creating a jira and > uploading to it? > > mahadev > > 2012/2/10 C=E9sar =C1lvarez N=FA=F1ez : >> This is the java.env file content. >> >> now=3D`date +%d%m%Y_%H%M%S` >> >> gcLogFile=3D"/srv/zk/GC/`hostname`-${now}.log" >> gcOpts=3D"${gcOpts} -Xloggc:$gcLogFile" >> gcOpts=3D"${gcOpts} -XX:+PrintGC" >> gcOpts=3D"${gcOpts} -XX:+PrintGCTimeStamps" >> gcOpts=3D"${gcOpts} -XX:+PrintGCDetails" >> gcOpts=3D"${gcOpts} -XX:+PrintTenuringDistribution" >> gcOpts=3D"${gcOpts} -XX:+PrintHeapAtGC" >> >> gcOpts=3D"${gcOpts} -XX:+AggressiveHeap" >> #https://cwiki.apache.org/confluence/display/ZOOKEEPER/Troubleshooting >> #gcOpts=3D"${gcOpts} -XX:+UseConcMarkSweepGC" >> #gcOpts=3D"${gcOpts} -XX:ParallelGCThreads=3D8" >> #gcOpts=3D"-Xms128M -Xmx1G" >> >> jvmOpts=3D"${jvmOpts} -d64" >> jvmOpts=3D"${jvmOpts} -server" >> jvmOpts=3D"${jvmOpts} -XX:+UseCompressedOops" >> >> JVMFLAGS=3D"${gcOpts} ${jvmOpts}" >> >> /C=E9sar. >> >> On Thu, Feb 9, 2012 at 7:17 PM, Mahadev Konar w= rote: >> >>> 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 mem= ory" >>> > 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 over= all >>> zk >>> > usage at any moment in time was relative small. >>> > >>> > BR, >>> > /C=E9sar. >>> > >>> > On Thu, Feb 9, 2012 at 3:14 PM, Camille Fournier >>> wrote: >>> > >>> >> This is really a question about how the jvm grows its heaps and resi= zes >>> >> them. If the jvm cannot allocate enough memory for the process becau= se >>> you >>> >> didn't set the max memory high enough, it will fall over. Zookeeper >>> keeps >>> >> its entire state in memory for performance reasons, if it were to sw= ap >>> that >>> >> 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 gro= ws >>> >> > 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 shrin= k if >>> >> > we purge some of the data. >>> >> > >>> >> > Now, this isn't a big problem, I'm just curious if the process wil= l >>> fall >>> >> > over at some point if it can't get more memory or if it'll just ma= ke >>> due >>> >> > 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 >>> >> > >>> >> >>> >>> >>> >>> -- >>> Mahadev Konar >>> Hortonworks Inc. >>> http://hortonworks.com/ >>> > > > > -- > Mahadev Konar > Hortonworks Inc. > http://hortonworks.com/