[
https://issues.apache.org/jira/browse/CASSANDRA-7438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14199976#comment-14199976
]
Robert Stupp commented on CASSANDRA-7438:
-----------------------------------------
Debugging C code via JNI and debugging Unsafe code on large data structures is
a nightmare.
And a simple, stupid bug in both kinds can quickly let the JVM core dump.
Advantage for the Unsafe approach is that all OS are directly supported.
Advantage for the JNI approach is that the code that handles the data
structures is much easier to read.
Proposal:
* Extract the changes that support "pluggable ICacheProvide" from this ticket
to a separate ticket and commit that stuff
* Let Vijay continue his work on this one
* Provide an alternative implementation using Unsafe
* Let both implementations "compete" in some long running tests
This is much effort to do - but I don't know how to validate either solution
theoretically.
> Serializing Row cache alternative (Fully off heap)
> --------------------------------------------------
>
> Key: CASSANDRA-7438
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7438
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Environment: Linux
> Reporter: Vijay
> Assignee: Vijay
> Labels: performance
> Fix For: 3.0
>
> Attachments: 0001-CASSANDRA-7438.patch
>
>
> Currently SerializingCache is partially off heap, keys are still stored in
> JVM heap as BB,
> * There is a higher GC costs for a reasonably big cache.
> * Some users have used the row cache efficiently in production for better
> results, but this requires careful tunning.
> * Overhead in Memory for the cache entries are relatively high.
> So the proposal for this ticket is to move the LRU cache logic completely off
> heap and use JNI to interact with cache. We might want to ensure that the new
> implementation match the existing API's (ICache), and the implementation
> needs to have safe memory access, low overhead in memory and less memcpy's
> (As much as possible).
> We might also want to make this cache configurable.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)