You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2012/11/17 14:05:22 UTC
[jira] [Commented] (CASSANDRA-3997) Make SerializingCache Memory
Pluggable
[ https://issues.apache.org/jira/browse/CASSANDRA-3997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499414#comment-13499414 ]
Jonathan Ellis commented on CASSANDRA-3997:
-------------------------------------------
So to summarize:
- We don't need JNI
- LD_PRELOAD makes things segfault but LD_LIBRARY_PATH works fine
Right?
It looks to me like we can make Allocator just return a long. Then the Memory heirarchy doesn't need to change at all.
Messier but easy: just add a static Allocator to Memory.
More refactoring but cleaner? move allocation outside of Memory and replace with constructor (long reference, long bytes); add allocate(long bytes) and allocateRefCounted(long bytes) factory to Allocator. RefCountedMemory would need to wrap Memory instead of subclassing.
I also suggest adding a commented-out example to cassandra.yaml and cassandra-env.sh to illustrate how to enable this for those brave enough to try it. (This will go into 1.3 so plenty of time to test.)
> Make SerializingCache Memory Pluggable
> --------------------------------------
>
> Key: CASSANDRA-3997
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3997
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Vijay
> Assignee: Vijay
> Priority: Minor
> Labels: cache
> Fix For: 1.3
>
> Attachments: 0001-CASSANDRA-3997.patch, 0001-CASSANDRA-3997-v2.patch, 0001-CASSANDRA-3997-v3.patch, jna.zip
>
>
> Serializing cache uses native malloc and free by making FM pluggable, users will have a choice of gcc malloc, TCMalloc or JEMalloc as needed.
> Initial tests shows less fragmentation in JEMalloc but the only issue with it is that (both TCMalloc and JEMalloc) are kind of single threaded (at-least they crash in my test otherwise).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira