You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benedict (JIRA)" <ji...@apache.org> on 2014/02/12 01:42:19 UTC

[jira] [Commented] (CASSANDRA-6689) Partially Off Heap Memtables

    [ https://issues.apache.org/jira/browse/CASSANDRA-6689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13898564#comment-13898564 ] 

Benedict commented on CASSANDRA-6689:
-------------------------------------

I've uploaded a patch [here|https://github.com/belliottsmith/cassandra/tree/offheap.merge]

In the simplest terms this boils down to a new off heap allocator. However it is much more involved than that, as we need to now manage the life cycle of the memory in question.

I won't go into excessive detail here, because I have tried to do so as much as possible in the code itself. For full details see the comments in OffHeapCleaner, RefAction/Referrer, OffHeapAllocator, OffHeapRegion.

The basic thrust of the approach is that we guard accesses to the memory through the OpOrder synchronisation primitive introduced with the CASSANDRA-5549. However to prevent stalls and make management of the memory easier, we have some further stages to the lifecycle which are much more GC-like. A corollary is that we also effectively perform GC of the data in the memtable, so that space that is no longer needed as a result of overwritten records can be made available again without first flushing the memtable.


> Partially Off Heap Memtables
> ----------------------------
>
>                 Key: CASSANDRA-6689
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6689
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Benedict
>            Assignee: Benedict
>             Fix For: 2.1
>
>
> Move the contents of ByteBuffers off-heap for records written to a memtable.
> (See comments for details)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)