Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-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 4B2004BB8 for ; Mon, 9 May 2011 17:17:42 +0000 (UTC) Received: (qmail 42492 invoked by uid 500); 9 May 2011 17:17:40 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 42467 invoked by uid 500); 9 May 2011 17:17:40 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 42459 invoked by uid 99); 9 May 2011 17:17:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 17:17:40 +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 (nike.apache.org: domain of hannes@eyealike.com designates 209.85.213.172 as permitted sender) Received: from [209.85.213.172] (HELO mail-yx0-f172.google.com) (209.85.213.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 17:17:33 +0000 Received: by yxk30 with SMTP id 30so2367873yxk.31 for ; Mon, 09 May 2011 10:17:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.176.35 with SMTP id a23mr8356435yhm.386.1304961432992; Mon, 09 May 2011 10:17:12 -0700 (PDT) Received: by 10.236.156.163 with HTTP; Mon, 9 May 2011 10:17:12 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 May 2011 10:17:12 -0700 Message-ID: Subject: Re: Native heap leaks? From: Hannes Schmidt To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, May 5, 2011 at 4:16 PM, aaron morton wrot= e: > Hannes, > =A0 =A0 =A0 =A0To get a baseline of behaviour set disk_access to standard= . You will probably want to keep it like that if you want better control ov= er the memory on the box. I'll do a test with standard and report back. > > =A0 =A0 =A0 =A0Also connect to the box with JConsole and look at the Perm= Gen space used it is not included in the max heap space setting. You can al= so check the heap usage there, running inside of 1G is very tricky. PermGen is at 25M which doesn't explain the 700-1000M RSS overhead. Nevertheless, I wasn't aware that PermGen isn't capped by -Xmx, so thank you for pointing it out. > > =A0 =A0 =A0 =A0If you want to keep it inside of 2Gb trying setting the he= ap max to 1.5G, use standard IO, disable caches, and use a low memtable thr= eshold (it depends on how many CF's you have, try 32mb) I'm not sure I follow. Besides the slowly increasing RSS size, Cassandra works great for us with 1G. Don't the caches and memtables live in the heap? I am not seeing any GC pressure at all so 1G should be ok. Or do the caches and memtables have native components attached to them like JNA-allocated memory or direct byte buffers? > > Hope that helps. > > ----------------- > Aaron Morton > Freelance Cassandra Developer > @aaronmorton > http://www.thelastpickle.com > > On 5 May 2011, at 22:30, Hannes Schmidt wrote: > >> This was my first thought, too. We switched to mmap_index_only and >> didn't see any change in behavior. Looking at the smaps file attached >> to my original post, one can see that the mmapped index files take up >> only a minuscule part of RSS. >> >> On Wed, May 4, 2011 at 11:37 PM, Oleg Anastasyev wr= ote: >>> Probably this is because of mmapped io access mode, which is enabled by= default >>> in 64-bit VMs - RAM is occupied by data files. >>> If you have such a tight memory reqs, you can turn on standard access m= ode in >>> storage-conf.xml, but dont expect it to work fast then: >>> >>> >>> >>> =A0standard >>> >>> > >