Re: Off-heap row cache and mmapped sstables

2012-04-17 Thread Jonathan Ellis
Absolutely.  Best practice is still to disable swap entirely on server
machines; mlockall is just our best attempt to at least keep your JVM
from swapping if you've forgotten this.

On Thu, Apr 12, 2012 at 11:15 AM, Omid Aladini omidalad...@gmail.com wrote:
 Hi,

 Cassandra issues an mlockall [1] before mmap-ing sstables to prevent
 the kernel from paging out heap space in favor of memory-mapped
 sstables. I was wondering, what happens to the off-heap row cache
 (saved or unsaved)? Is it possible that the kernel pages out off-heap
 row cache in favor of resident mmap-ed sstable pages?

 Thanks,
 Omid

 [1] http://pubs.opengroup.org/onlinepubs/007908799/xsh/mlockall.html



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


Re: Off-heap row cache and mmapped sstables

2012-04-16 Thread Rob Coli
On 4/12/12, Omid Aladini omidalad...@gmail.com wrote:
 Cassandra issues an mlockall [1] before mmap-ing sstables to prevent
 the kernel from paging out heap space in favor of memory-mapped
 sstables. I was wondering, what happens to the off-heap row cache
 (saved or unsaved)? Is it possible that the kernel pages out off-heap
 row cache in favor of resident mmap-ed sstable pages?

For what it's worth, I find this conjecture plausible given my
understanding of the Cassandra ticket which resulted in the use of
JNA+mlockall. I'd love to hear an opinion from someone from the
project with more in-depth knowledge. :)

=Rob

-- 
=Robert Coli
AIMGTALK - rc...@palominodb.com
YAHOO - rcoli.palominob
SKYPE - rcoli_palominodb


Off-heap row cache and mmapped sstables

2012-04-12 Thread Omid Aladini
Hi,

Cassandra issues an mlockall [1] before mmap-ing sstables to prevent
the kernel from paging out heap space in favor of memory-mapped
sstables. I was wondering, what happens to the off-heap row cache
(saved or unsaved)? Is it possible that the kernel pages out off-heap
row cache in favor of resident mmap-ed sstable pages?

Thanks,
Omid

[1] http://pubs.opengroup.org/onlinepubs/007908799/xsh/mlockall.html