You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by mcasandra <mo...@gmail.com> on 2011/03/14 19:59:27 UTC

Linux HugePages and mmap

Currently, in cassandra.yaml disk_access_mode is set to "auto" but the
recommendation seems to be to use 'mmap_index_only'.

If we use HugePages then do we still need to worry about setting
disk_access_mode to mmap? I am planning to enable HugePages and use
-XX:+UseLargePages option in JVM. I had a very good experience using
HugePages with Oracle.


--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Linux-HugePages-and-mmap-tp6170193p6170193.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: Linux HugePages and mmap

Posted by Oleg Anastasyev <ol...@gmail.com>.
mcasandra <mohitanchlia <at> gmail.com> writes:

> 
> Thanks! I think it still is a good idea to enable HiugePages and use
> UseLargePageSize option in JVM. What do you think?

I experimented with it. It was about 10% performance improvement. But this was
on 100% row cache hit. On smaller cache hit ratios the performance gain will be
smaller, I believe.


Re: Linux HugePages and mmap

Posted by mcasandra <mo...@gmail.com>.
Thanks! I think it still is a good idea to enable HiugePages and use
UseLargePageSize option in JVM. What do you think?

--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Linux-HugePages-and-mmap-tp6170193p6171008.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: Linux HugePages and mmap

Posted by Jonathan Ellis <jb...@gmail.com>.
On Mon, Mar 14, 2011 at 3:01 PM, mcasandra <mo...@gmail.com> wrote:
>
> Jonathan Ellis-3 wrote:
>>
>> Wrong.  The recommendation is to leave it on auto.
>>
> this is where I see mmap recommended for index.
> http://wiki.apache.org/cassandra/StorageConfiguration

FTFY.

>> HugePages has nothing to do with disk access mode.
>>
> Can you explain little more? Isn't mmap pinning the process memory in RAM
> similar to HugePages?

mmap is about mapping address space to data files.

HugePages affects how the kernel tracks address space via TLB.  It
does NOT affect what is actually mapped there.

http://wiki.apache.org/cassandra/FAQ#mmap
http://lwn.net/Articles/374424/

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Re: Linux HugePages and mmap

Posted by mcasandra <mo...@gmail.com>.
Jonathan Ellis-3 wrote:
> 
> Wrong.  The recommendation is to leave it on auto.
> 
this is where I see mmap recommended for index. 
http://wiki.apache.org/cassandra/StorageConfiguration
http://wiki.apache.org/cassandra/StorageConfiguration 



Jonathan Ellis-3 wrote:
> 
> HugePages has nothing to do with disk access mode.
> 
Can you explain little more? Isn't mmap pinning the process memory in RAM
similar to HugePages?


--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Linux-HugePages-and-mmap-tp6170193p6170423.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: Linux HugePages and mmap

Posted by Jonathan Ellis <jb...@gmail.com>.
On Mon, Mar 14, 2011 at 1:59 PM, mcasandra <mo...@gmail.com> wrote:
> Currently, in cassandra.yaml disk_access_mode is set to "auto" but the
> recommendation seems to be to use 'mmap_index_only'.

Wrong.  The recommendation is to leave it on auto.

> If we use HugePages then do we still need to worry about setting
> disk_access_mode to mmap? I am planning to enable HugePages and use
> -XX:+UseLargePages option in JVM. I had a very good experience using
> HugePages with Oracle.

HugePages has nothing to do with disk access mode.

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com