From user-return-11594-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Wed Jul 25 21:56:18 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2EFBB18062C for ; Wed, 25 Jul 2018 21:56:18 +0200 (CEST) Received: (qmail 37826 invoked by uid 500); 25 Jul 2018 19:56:16 -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 37815 invoked by uid 99); 25 Jul 2018 19:56:16 -0000 Received: from mail-relay.apache.org (HELO mailrelay2-lw-us.apache.org) (207.244.88.137) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2018 19:56:16 +0000 Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by mailrelay2-lw-us.apache.org (ASF Mail Server at mailrelay2-lw-us.apache.org) with ESMTPSA id C8EE22B19 for ; Wed, 25 Jul 2018 19:56:15 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id s9-v6so7227042wmh.3 for ; Wed, 25 Jul 2018 12:56:15 -0700 (PDT) X-Gm-Message-State: AOUpUlGkmgTA/pk8C8xFfRHU9gx01kFVc8jhMMlt4rUmS8ejgewS/RzA S79jRt7H227/yuEr22xIWzuyLgIU00YsS/MdzPI= X-Google-Smtp-Source: AAOMgpfjC/Sbn52z7cp0xNqXpcj84fmVw3rOgS2IJIZbRkP3nGLaYZqiKiblNxQkhO0FZnwnEwgVSJfhje8IW/WF3Uw= X-Received: by 2002:a1c:1252:: with SMTP id 79-v6mr5398744wms.70.1532548574849; Wed, 25 Jul 2018 12:56:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Patrick Hunt Date: Wed, 25 Jul 2018 12:55:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Zookeeper memory usage To: UserZooKeeper Content-Type: multipart/alternative; boundary="00000000000067b62f0571d84590" --00000000000067b62f0571d84590 Content-Type: text/plain; charset="UTF-8" JVM memory usage is limited by your java heap configuration. GC will kick in to keep it within the bound but the JVM will try to use whatever you configure as the max. Patrick On Tue, Jul 24, 2018 at 4:27 AM Alex Dzyoba wrote: > I forgot to mention that I'm using Zookeeper version 3.5.3-beta > On Tue, Jul 24, 2018 at 2:16 PM Alex Dzyoba wrote: > > > > Hi, > > > > Could someone shed some light on why Zookeeper eats that much memory? > > I have a cluster of 3 with 11 million znodes in it and `mntr` tells me > > that the approximate data size is 9GB (9019066201 precisely) and the > > snapshot size on disk is 9.3 GB. But the JVM itself eats a whopping > > 26GB of RAM. > > > > Here is the jstat output for my leader instance: > > > > S0C S1C S0U S1U EC EU OC OU > > MC MU CCSC CCSU YGC YGCT FGC FGCT GCT > > 0.0 114688.0 0.0 114688.0 12058624.0 11141120.0 19193856.0 > > 16508964.9 17024.0 16305.7 1920.0 1701.6 728 68.993 0 > > 0.000 68.993 > > > > If we sum usage for all spaces (S0U + S1U + EU + OU + MU + CCSU) it > > will be 26 GB. > > > > Why is there such mismatch between zookeeper approximate data size of > > 9GB and actual JVM usage (26GB)? Even if we count only G1 old space > > it's still 16 GB memory usage. > > > > I use openjdk 1.8.0_141 with G1GC. > > > > Thanks! > --00000000000067b62f0571d84590--