Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 99794 invoked from network); 14 Dec 2010 18:19:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Dec 2010 18:19:58 -0000 Received: (qmail 22227 invoked by uid 500); 14 Dec 2010 18:19:56 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 22201 invoked by uid 500); 14 Dec 2010 18:19:56 -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 22193 invoked by uid 99); 14 Dec 2010 18:19:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Dec 2010 18:19:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.160.172] (HELO mail-gy0-f172.google.com) (209.85.160.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Dec 2010 18:19:49 +0000 Received: by gyd12 with SMTP id 12so578888gyd.31 for ; Tue, 14 Dec 2010 10:19:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.151.48.7 with SMTP id a7mr8615145ybk.33.1292350765870; Tue, 14 Dec 2010 10:19:25 -0800 (PST) Sender: scode@scode.org Received: by 10.150.220.9 with HTTP; Tue, 14 Dec 2010 10:19:25 -0800 (PST) X-Originating-IP: [213.114.156.79] In-Reply-To: References: Date: Tue, 14 Dec 2010 19:19:25 +0100 X-Google-Sender-Auth: lk63eJSkH6lOrfjpclYNAJY2WSw Message-ID: Subject: Re: Memory leak with Sun Java 1.6 ? From: Peter Schuller To: user@cassandra.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable >> Memory-mapped files will account for both virtual and, to the extent >> that they are resident in memory, to the resident size of the process. > > =C2=A0This bears further investigation. =C2=A0Would you consider a 3GB ov= erhead > =C2=A0on a 4GB heap a possibility? =C2=A0(From a position of some naivety= , this > =C2=A0seems a bit extreme, though I'm continually surprised by Java.) The point is that you might see 200 gb if you have 200 gb on files on disk that are mapped, so when using mmap the resident size is misleading. > =C2=A0This was my concern. =C2=A0As mentioned, we're on 7GB machines, > =C2=A04GB JVM heap, and an expectation that we'll get some gain > =C2=A0from the remainder being used sensibly by Linux as cache. Data mmap():ed on file and resident is essentially LInux page cache - it is just also mapped into the process. >> Just to confirm, what does the free +/- buffers show if you run >> 'free'? (I.e., middle line, under 'free' column) > > =C2=A0Dang. =C2=A0I thought I'd kept a cap of top and free on those boxes > =C2=A0before restarting Cassandra. =C2=A0I'm confident that the item you'= re > =C2=A0talking about matches top's 'cached' entry - which at the time > =C2=A0was showing ~ 10MB. free +/- buffers shows what the actual free memory is when discounting the page cache. Since on most systems you'll always have page cache filling up most memory (after some uptime), this is the only relevant number to look at to answer the general question of 'how much memory is left'. It gets complicated when your software actually depends on the page cache though. >> A Java memory leak would likely indicate non-heap managed memory >> (since I think it's unlikely that the JVM fails to limit the actual >> heap size). The question is what.... > > =C2=A0I guess this comes back to my first question - (how) can a JVM with > =C2=A0a heap of 4GB get to 7.1GB of resident? =C2=A0I understand a proces= s can > =C2=A0blow out its virtual footprint, and despite a lack of swap on those > =C2=A0boxes, that bit isn't in itself a massive concern. mmap():ed that's resident gets counted. --=20 / Peter Schuller