You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jaesung Lee <lj...@gmail.com> on 2011/11/17 08:16:20 UTC

mmap I/O and shared memory

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 (http://www.sparrowmailapp.com/?sig)


Re: mmap I/O and shared memory

Posted by Tyler Hobbs <ty...@datastax.com>.
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 <lj...@gmail.com> 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 <http://www.sparrowmailapp.com/?sig>
>
>


-- 
Tyler Hobbs
DataStax <http://datastax.com/>