You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "T Jake Luciani (JIRA)" <ji...@apache.org> on 2011/01/06 19:32:06 UTC
[jira] Created: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Use EHcache for row cache + disk spillover
------------------------------------------
Key: CASSANDRA-1945
URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
Project: Cassandra
Issue Type: Improvement
Components: Core
Reporter: T Jake Luciani
Ehcache does a nice job of spilling over to disk and its ASL2
http://www.ehcache.org/license.html
Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Vijay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980204#action_12980204 ]
Vijay commented on CASSANDRA-1945:
----------------------------------
1) yes if we use java reflection API but don't we have the rows stored in bytes already?
2) right now there is no way to have a big cache for a certian key space... even though we provide MMap there is no way to predict the IO's as you mentioned earlier... and it is not tunable per key space (is it?)... And the cache with less GC will always help in these cases (Atleast till we get GC First in jdk 7).... And we also provide choices to the user :)
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: Vijay
> Attachments: 0001-Config-1945.txt, 0002-Update_existing-1945.txt, 0003-New_Cache_Providers-1945.txt, BB_Cache.png, ehcache-1.6.2.jar, EhCache-OSS.png, JMX-Cache.png, JMX-EhCache.png, Old_Cahce.png
>
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980129#action_12980129 ]
Jonathan Ellis commented on CASSANDRA-1945:
-------------------------------------------
Sounds like BigMemory pushes everything through Java serialization, which is a huge ouch. Their page says
"Because off-heap data is stored in bytes, there are two implications:
* "Only Serializable cache keys and values can be placed in the store, similar to DiskStore.
* "Serialization and deserialization take place on putting and getting from the store. This means that the off-heap store is slower in an absolute sense (around 10 times slower than the MemoryStore)"
10x slower is awfully close to "don't bother with rowcache and just rebuild it using the OS page cache to cache the underlying sstable bytes" territory for us.
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: Vijay
> Attachments: 0001-Config-1945.txt, 0002-Update_existing-1945.txt, 0003-New_Cache_Providers-1945.txt, BB_Cache.png, ehcache-1.6.2.jar, EhCache-OSS.png, JMX-Cache.png, JMX-EhCache.png, Old_Cahce.png
>
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Vijay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979912#action_12979912 ]
Vijay commented on CASSANDRA-1945:
----------------------------------
Jonathan,
IMHO: I am kind of nutral but I think, people have to do their own testing on the data set which will be in memory... if they fail to do so we might have the above mentioned... in that case the I/O performance degrades but it still works.
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "T Jake Luciani (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980126#action_12980126 ]
T Jake Luciani commented on CASSANDRA-1945:
-------------------------------------------
sorry, I was referring to disk-persistance not spillover. I think the value of using ehcache here is to allow folks the option use the BigMemory option for ehcache. If we think we should go with our own BigMemory implementation I'm fine with that if it works :)
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: Vijay
> Attachments: 0001-Config-1945.txt, 0002-Update_existing-1945.txt, 0003-New_Cache_Providers-1945.txt, BB_Cache.png, ehcache-1.6.2.jar, EhCache-OSS.png, JMX-Cache.png, JMX-EhCache.png, Old_Cahce.png
>
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979882#action_12979882 ]
Jonathan Ellis commented on CASSANDRA-1945:
-------------------------------------------
does spill-to-disk make sense for us, when our cache is fully disk-backed already? it seems like that's a good way to make really hard-to-understand i/o patterns
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Ryan King (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979898#action_12979898 ]
Ryan King commented on CASSANDRA-1945:
--------------------------------------
If we'd like to improve our disk storage we should improve/replace the existing implementations, rather than add another layer.
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Vijay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vijay updated CASSANDRA-1945:
-----------------------------
Attachment: Old_Cahce.png
BB_Cache.png
JMX-Cache.png
Attached Screenshots - for comparison.
Tests where run on identical data set and on ideal conditions with 1 node.
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Attachments: 0001-Config-1945.txt, 0002-Update_existing-1945.txt, 0003-New_Cache_Providers-1945.txt, BB_Cache.png, ehcache-1.6.2.jar, EhCache-OSS.png, JMX-Cache.png, JMX-EhCache.png, Old_Cahce.png
>
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Vijay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vijay updated CASSANDRA-1945:
-----------------------------
Attachment: 0003-New_Cache_Providers-1945.txt
0002-Update_existing-1945.txt
0001-Config-1945.txt
I was trying to implement the BigMemory concept into Cassandra cache..... I was trying BB for caching and the performance looks great, nearly 50% less footprint in the heap (org.apache.cassandra.cache.bblru.JMXByteBufferCacheProvider) and the concurrent mark sweep shows better performance (tried @ multiple times w/t similar conditions - CPU and memory usage).
I did a very basic testing....
I also tried ehcache (OSS version) and it had almost similar performance to the existing cache but it has disk persistence so I have attached the Patch.
Let me know if you want separate ticket for BB cache. but i think this gives the user flexibility to choose the cache_provider during startup.
NOTE: The Code Attached is for POC and needs some cleanup's.
Thanks You!
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Attachments: 0001-Config-1945.txt, 0002-Update_existing-1945.txt, 0003-New_Cache_Providers-1945.txt, ehcache-1.6.2.jar, EhCache-OSS.png, JMX-EhCache.png
>
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Vijay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vijay updated CASSANDRA-1945:
-----------------------------
Attachment: EhCache-OSS.png
JMX-EhCache.png
ehcache-1.6.2.jar
Screenshots and Ehcache jar.
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Attachments: 0001-Config-1945.txt, 0002-Update_existing-1945.txt, 0003-New_Cache_Providers-1945.txt, ehcache-1.6.2.jar, EhCache-OSS.png, JMX-EhCache.png
>
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985037#action_12985037 ]
Jonathan Ellis commented on CASSANDRA-1945:
-------------------------------------------
followup is CASSANDRA-1969
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: Vijay
> Attachments: 0001-Config-1945.txt, 0002-Update_existing-1945.txt, 0003-New_Cache_Providers-1945.txt, BB_Cache.png, ehcache-1.6.2.jar, EhCache-OSS.png, JMX-Cache.png, JMX-EhCache.png, Old_Cahce.png
>
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-1945) Use EHcache for row cache + disk
spillover
Posted by "Vijay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980213#action_12980213 ]
Vijay commented on CASSANDRA-1945:
----------------------------------
BTW: this patch doesn't use object serialization (using reflection) it uses our CF serializer.
> Use EHcache for row cache + disk spillover
> ------------------------------------------
>
> Key: CASSANDRA-1945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1945
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: Vijay
> Attachments: 0001-Config-1945.txt, 0002-Update_existing-1945.txt, 0003-New_Cache_Providers-1945.txt, BB_Cache.png, ehcache-1.6.2.jar, EhCache-OSS.png, JMX-Cache.png, JMX-EhCache.png, Old_Cahce.png
>
>
> Ehcache does a nice job of spilling over to disk and its ASL2
> http://www.ehcache.org/license.html
> Also, the commercial version supports Smaller JVM sizes via it's BigMemory product
> http://www.terracotta.org/bigmemory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.