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

Jonathan Ellis commented on CASSANDRA-1969:
-------------------------------------------

Yes, using the raw Memory should work.  (You don't need the synchronization 
hack either, if you avoid BB entirely.)

I've rebased again, fixed some tests, and split it back up into two patches. At 
worst, we can commit 01 now and 02 for 0.8.1 or whenever JNA gets a release out.

One other problem: the configuration option (in patch 01) is causing a problem.

{noformat}
ant clean test -Dtest.name=DatabaseDescriptorTestBuildfile
    [junit] Testcase: 
testKSMetaDataSerialization(org.apache.cassandra.config.DatabaseDescriptorTest):
  Caused an ERROR
    [junit] java.lang.String cannot be cast to org.apache.avro.util.Utf8
    [junit] java.lang.ClassCastException: java.lang.String cannot be cast to 
org.apache.avro.util.Utf8
    [junit]     at org.apache.avro.util.Utf8.compareTo(Utf8.java:27)
    [junit]     at 
org.apache.avro.generic.GenericData.compare(GenericData.java:523)
    [junit]     at 
org.apache.avro.specific.SpecificData.compare(SpecificData.java:190)
    [junit]     at 
org.apache.avro.generic.GenericData.compare(GenericData.java:517)
    [junit]     at 
org.apache.avro.specific.SpecificData.compare(SpecificData.java:190)
    [junit]     at 
org.apache.avro.generic.GenericData.compare(GenericData.java:494)
    [junit]     at 
org.apache.avro.specific.SpecificData.compare(SpecificData.java:190)
    [junit]     at 
org.apache.avro.generic.GenericData.compare(GenericData.java:508)
    [junit]     at 
org.apache.avro.specific.SpecificData.compare(SpecificData.java:190)
    [junit]     at 
org.apache.avro.generic.GenericData.compare(GenericData.java:494)
    [junit]     at 
org.apache.avro.specific.SpecificData.compare(SpecificData.java:190)
    [junit]     at 
org.apache.avro.specific.SpecificRecordBase.compareTo(SpecificRecordBase.java:45)
    [junit]     at 
org.apache.avro.specific.SpecificRecordBase.equals(SpecificRecordBase.java:35)
    [junit]     at 
org.apache.cassandra.config.DatabaseDescriptorTest.serDe(DatabaseDescriptorTest.java:42)
    [junit]     at 
org.apache.cassandra.config.DatabaseDescriptorTest.testKSMetaDataSerialization(DatabaseDescriptorTest.java:66)
{noformat}


> Use BB for row cache - To Improve GC performance.
> -------------------------------------------------
>
>                 Key: CASSANDRA-1969
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1969
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: Linux and Mac
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>         Attachments: 0001-Config-1969.txt, 
> 0001-introduce-ICache-InstrumentingCache-IRowCacheProvider.txt, 
> 0001-introduce-ICache-InstrumentingCache-IRowCacheProvider.txt, 
> 0002-Update_existing-1965.txt, 0002-implement-SerializingCache.txt, 
> 0002-implement-SerializingCache.txt, 0002-implement-SerializingCacheV2.txt, 
> 0003-New_Cache_Providers-1969.txt, 0003-add-ICache.isCopying-method.txt, 
> 0004-Null-Check-and-duplicate-bb.txt, 0004-TestCase-1969.txt, 
> 1969-rollup-and-config.txt, 1969_Cache_SVN_Patch.diff, BB_Cache-1945.png, 
> JMX-Cache-1945.png, Old_Cahce-1945.png, POC-0001-Config-1945.txt, 
> POC-0002-Update_existing-1945.txt, POC-0003-New_Cache_Providers-1945.txt
>
>
> Java BB.allocateDirect() will allocate native memory out of the JVM and will 
> help reducing the GC pressure in the JVM with a large Cache.
> From some of the basic tests it shows around 50% improvement than doing a 
> normal Object cache.
> In addition this patch provide the users an option to choose 
> BB.allocateDirect or store everything in the heap.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to