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

Jonathan Ellis commented on CASSANDRA-3997:
-------------------------------------------

To update from IRC:

Vijay said he tried jemalloc via LD_PRELOAD and hit corruption problems related 
to multi-threaded use.  Which is odd, because 
http://www.canonware.com/jemalloc/, 
http://www.facebook.com/notes/facebook-engineering/scalable-memory-allocation-using-jemalloc/480222803919,
 and others claim jemalloc is designed for multithreaded use cases.

(If there ARE thread safety problems w/ jemalloc, shouldn't the patch 
synchronize somewhere?)

I did find http://comments.gmane.org/gmane.comp.db.redis.general/7736 which 
corroborates "weird problems w/ jemalloc and the jvm," although throwing redis 
into the mix definitely doesn't simplify things.

I think this is worth following up on for two reasons:

# I'd much rather let people customize malloc via preload, than having to write 
Java + JNA stubs for each
# If there are corruption problems with jemalloc, it could affect our cache too

Can you follow up on http://www.canonware.com/mailman/listinfo/jemalloc-discuss 
and see if they can clear anything up?
                
> 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.2
>
>         Attachments: 0001-CASSANDRA-3997.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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to