[ https://issues.apache.org/jira/browse/CASSANDRA-8714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309983#comment-14309983 ]
Ariel Weisberg commented on CASSANDRA-8714: ------------------------------------------- Something doesn't sit right with me for the difference between JNA accessing jemalloc via JNI and Unsafe. Since you are benchmarking access path I think you only need to allocate 1-byte. Make sure to store a value to the location so the page is touched. If Unsafe is slower I would be comfortable with using JNA to allocate. You mention address translation (addr_to_java), but that is just a cast to get things to compile. I followed it through to os.cpp and I don't see any real extra work. It's quite possible the results are accurate and JNI just ended up better optimized then the native function calls in Unsafe. JNI has received a lot of attention. > row-cache: use preloaded jemalloc w/ Unsafe > ------------------------------------------- > > Key: CASSANDRA-8714 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8714 > Project: Cassandra > Issue Type: Sub-task > Reporter: Robert Stupp > Assignee: Robert Stupp > Fix For: 3.0 > > Attachments: 8714.txt > > > Using jemalloc via Java's {{Unsafe}} is a better alternative on Linux than > using jemalloc via JNA. -- This message was sent by Atlassian JIRA (v6.3.4#6332)