Hi, there,
We are evaluating TreeCache's capacity, by using it to cache temporary data,
without any database connection.
We configure the JVM heapspace to 1024M, and put as many objects as possible
into the cache, to see its upper limit. Each object has a unique key, so that
the entire tree has is flat with one level.
Each object size is of 150k bytes, and we found we can hardly cache 1500
objects into the TreeCache. Therefore, only 225M is used out of 1024M JVM heap
space.
Is there anything wrong with our coding and/or config?
private final String CONFIG_FILE_PATH = "config/replsync-service.xml";
| TreeCache tree = new TreeCache();
| PropertyConfigurator config = new PropertyConfigurator();
| config.configure(tree, CONFIG_FILE_PATH);
| tree.createService();
| JbossCacheListener lis = new JbossCacheListener();
| tree.addTreeCacheListener(lis);
| tree.startService();
|
| try
| {
| for (int i = 0; i < 2000; i++)
| tree.put(Integer.toString(i), data);
| }
| catch ...
And in the config, CONFIG_FILE_PATH, we specify,
<attribute
name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
| <!-- Specific eviction policy configurations. This is LRU -->
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">5</attribute>
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">5000</attribute>
| <!--time to live 1 hour-->
| <attribute name="timeToLiveSeconds">86400</attribute>
| </region>
We are sure that we must have done something wrong, but what is it?
many thanks,
Kan
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878183#3878183
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878183
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user