cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <>
Subject Re: mmap
Date Thu, 15 Jul 2010 17:01:21 GMT
On Thu, Jul 15, 2010 at 11:41 AM, Peter Schuller
<> wrote:
> Not really. That is, the intent of mmap is to let the OS dynamically
> choose what gets swapped in and out. The practical problem is that the
> OS will often tend to swap too much. I got the impression jbellis
> wasn't convinced, but my anecdotal experience is that this is a much
> larger problem for mmap():ed data than for regular buffer cached data

I'm convinced. :)  See comments on

> Also, personally I'm interested in hearing what kind of performance
> impacts people have *actually* seen with standard I/O; especially if
> cassandra is configured to configure a significant amount of data in
> RAM itself. I'm a bit skeptical about claims of extreme performance
> differences, in spite of syscalls being expensive.

The main problem is not the syscall so much as Java insisting on
zeroing out any buffer you create, which is a big hit to performance
when you're allocating buffers for file i/o on each request instead of
just mmaping things.  Re-using those buffers would be possible but
difficult; I think using mlockall to "fix" the mmap approach is more

Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support

View raw message