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 28D479C6B for ; Fri, 18 Nov 2011 04:42:53 +0000 (UTC) Received: (qmail 70682 invoked by uid 500); 18 Nov 2011 04:42:51 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 70651 invoked by uid 500); 18 Nov 2011 04:42:50 -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 70638 invoked by uid 99); 18 Nov 2011 04:42:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2011 04:42:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HS_INDEX_PARAM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tyler@datastax.com designates 209.85.161.44 as permitted sender) Received: from [209.85.161.44] (HELO mail-fx0-f44.google.com) (209.85.161.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2011 04:42:44 +0000 Received: by faap16 with SMTP id p16so5791386faa.31 for ; Thu, 17 Nov 2011 20:42:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.104.130 with SMTP id ge2mr871181lab.43.1321591343869; Thu, 17 Nov 2011 20:42:23 -0800 (PST) Received: by 10.152.19.102 with HTTP; Thu, 17 Nov 2011 20:42:23 -0800 (PST) In-Reply-To: <80C374D0BB0E4F94ACEE1DD08B956EC8@gmail.com> References: <80C374D0BB0E4F94ACEE1DD08B956EC8@gmail.com> Date: Thu, 17 Nov 2011 22:42:23 -0600 Message-ID: Subject: Re: mmap I/O and shared memory From: Tyler Hobbs To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d0408d3c196efb404b1faf626 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0408d3c196efb404b1faf626 Content-Type: text/plain; charset=ISO-8859-1 This FAQ entry and the linked document provide a pretty good explanation: http://wiki.apache.org/cassandra/FAQ#mmap By the way, you should almost always turn off swap. On Thu, Nov 17, 2011 at 1:16 AM, Jaesung Lee wrote: > I am running 7 nodes cassandra(v1.0.2) cluster. > I am putting 20K rows per sec to the cluster. > This cluster has 1 KS, 3CFs. > Each CF has 4-5 secondary indices. > > After I'v run for 1 week, nodes use swap memory. > I changed disk-access-mode to index_only or standard. > I got strange memory results. > > using mmap: > VIRT: 566g RES: 36g SHR:12g > standard disk access mode > VIRT:24.7g RES: 24g SHR:68m > > > I allocated 24g memory for JVM heap. > > I have some questions about mmap. > It is easy to analyze standard disk access mode's memory result. > > I know cassandra use huge virtual memory for mmap I/O and each mmaped > addresses are mapped to indexed file not swap memory. > > But, I don't understand why cassandra use shared memory, if using mmap I/O. > > Are there some documents that explain this situation? > > -- > Jaesung Lee > Sent with Sparrow > > -- Tyler Hobbs DataStax --f46d0408d3c196efb404b1faf626 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This FAQ entry and the linked document provide a pretty good explanation: <= a href=3D"http://wiki.apache.org/cassandra/FAQ#mmap">http://wiki.apache.org= /cassandra/FAQ#mmap

By the way, you should almost always turn of= f swap.

On Thu, Nov 17, 2011 at 1:16 AM, Jaesung Lee= <ljsking@gmail.c= om> wrote:
I am running 7 nodes cassandra(v1.0.2) cluster.
I a= m putting 20K rows per sec to the cluster.
This cluster has 1 KS,= 3CFs.
Each CF has 4-5 secondary indices.

After I'v run for 1 week, nodes use swap memory.
I chang= ed disk-access-mode to index_only or standard.
I got strange memo= ry results.

using mmap:
VIRT: 566g =A0RE= S: 36g =A0SHR:12g
<= span style=3D"font-family:sans-serif">standard disk access mode
<= span style=3D"font-family:sans-serif">VIRT:24.7g =A0= RES:=A024g =A0SHR:68m
I allocated 24g= memory for JVM heap.

I have some questions about mmap.
It=A0is eas= y to=A0analyze standard disk access mode's memory result.
I know cassandra use huge virtual memory for mmap I/O and each = mmaped addresses are mapped to indexed file not swap memory.

But, I don't understand why cassandra use shared me= mory, if using mmap I/O.

Are there some documents = that=A0explain this situation?

--=A0
Jaesung Lee
Sent with Sparrow



-- <= br>Tyler Hobbs
DataStax
<= br> --f46d0408d3c196efb404b1faf626--