[jboss-user] [JBoss Cache: Core Edition] - Re: optimal storage parameters for cache node?
java.mastro
do-not-reply at jboss.com
Sun May 17 01:57:48 EDT 2009
Dear Member,
I do faced the same problem some time back.
Right now i can not give the statistics that you requested. But will let you know the work around(s) and
follow if it suits for you.
solution 1
--------------
Instead of keeping 10,000 key value attributes under a single node,
put your all key value pairs in a hash map and keep this hash map in the node.
As effect the jboss cache will have only one node under a node. In this way jboss cache overhead will be
eliminated and will give you the more performance in start up of jboss cache and reading the contents of it.
One side effect of jboss cache is that, as the size of the node increases the performance of cache start up and persisting the updates will be affected.
solution 2
------------
do segmentation using hashing Instead of putting all key value pairs under a single node.
What i mean to say is that, as your key is a long, Apply some kind of hashing so that, for any given number you will get the hash code between 0 to 9.
now distribute your key value pairs under different nodes as below.
if /x/y/z is your node under which you are placing attributes, after segmentation it will be
/x/y/z/0 - some key value pairs
/x/y/z/1 - some key value pairs
...
/x/y/z/9 - some key value pairs
performance wise there wont be any diff between depth of 3 and 4 if your are having values only at the leaf node.
Please note that, using database persistence for a node with MBs of data will be too slow and chances of failures are more. BJDBC is preferred in such cases.
hope your requirement satisfied
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231459#4231459
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231459
More information about the jboss-user
mailing list