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

Pavel Yaskevich commented on CASSANDRA-6694:
--------------------------------------------

I looked through the code and here is the couple of questions that I have/had:

# Can we decide if we actually want to have Cell (and derivatives) as this 
patch set proposes (with static Impl static classes which is OOP unfriendly to 
say the least) or do something else (question raised back in CASSANDRA-6689)?
# Is it essential to move everything to the separate package ".data" ?
# Do we want to have a number of pool/allocator implementations which allocate 
different type of objects or is it possible to make a generic container (for 
ByteBuffer/Memory) which would basically be a pointer to a bigger buffer that 
holds all of the components (name/value/timestamp) so we can have limited 
number of allocators/pools to maintain ([~jbellis] described the same vision in 
one of his previous comments)... Maybe there is a way which allows us to still 
have key/value/timestamp as fields, so we should only change callers 
method/class signatures instead? In general the idea would be to keep a single 
implementation of the Cell and add a generic placeholder instead of ByteBuffer.

> Slightly More Off-Heap Memtables
> --------------------------------
>
>                 Key: CASSANDRA-6694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6694
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>              Labels: performance
>             Fix For: 2.1 beta2
>
>
> The Off Heap memtables introduced in CASSANDRA-6689 don't go far enough, as 
> the on-heap overhead is still very large. It should not be tremendously 
> difficult to extend these changes so that we allocate entire Cells off-heap, 
> instead of multiple BBs per Cell (with all their associated overhead).
> The goal (if possible) is to reach an overhead of 16-bytes per Cell (plus 4-6 
> bytes per cell on average for the btree overhead, for a total overhead of 
> around 20-22 bytes). This translates to 8-byte object overhead, 4-byte 
> address (we will do alignment tricks like the VM to allow us to address a 
> reasonably large memory space, although this trick is unlikely to last us 
> forever, at which point we will have to bite the bullet and accept a 24-byte 
> per cell overhead), and 4-byte object reference for maintaining our internal 
> list of allocations, which is unfortunately necessary since we cannot safely 
> (and cheaply) walk the object graph we allocate otherwise, which is necessary 
> for (allocation-) compaction and pointer rewriting.
> The ugliest thing here is going to be implementing the various CellName 
> instances so that they may be backed by native memory OR heap memory.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to