incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Perroud (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRECTMEMORY-28) Consider using Unsafe instead DirectBuffer
Date Wed, 28 Dec 2011 18:28:31 GMT

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

Benoit Perroud commented on DIRECTMEMORY-28:
--------------------------------------------

Cassandra uses Unsafe for a simple reason : they are allocating a different memory region
for *every* cached object. Having this in mind, Unsafe.free directly free and return the region
(you need to pay extra attention to not read this region anymore), while ByteBuffer allocation
need to wait for grabage collection to be effectively freed. In the case of DM, as buffers
are way less frequently allocated and desallocated, I'm not sure the usage of Unsafe will
add lot of improvement.
                
> Consider using Unsafe instead DirectBuffer
> ------------------------------------------
>
>                 Key: DIRECTMEMORY-28
>                 URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-28
>             Project: Apache DirectMemory
>          Issue Type: Improvement
>            Reporter: Raffaele P. Guidi
>            Priority: Minor
>
> I already tried in the past but without too much success. Does it give any performance
improvement (considered the way we use it)?

--
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

        

Mime
View raw message