Hi, 

I am setting up a prototype to evaluate our re-engineering project. 
I need a cache system to hold the transaction data and I've choose JBoss Cache 
after browsing the website. So I am new to JBoss Cache and I meet a problem in 
setting up using the FileCacheLoader.

My intension is to first setup a simple Cache with file persist for fail over 
recovery.  Everything seems working fine untill I set up a FileCacheLoder.
The problem is it becomes SO SLOW for putting entries after set up the 
FileCacheLoader. I have a testing program that simply write and read
some objects to the same cache node in a loop. Before I set up the 
FileCacheLoader, it take only about 1-2ms to read/write an object. 
But after using the FileCacheLoader,  it takes 100ms to write an entry in the 
beginning and the time keeps growing and finally reach about 1000ms per write.  
I know there must be some performance degrade after using cacheLoader but this 
kind of degrade seems not right . Can somebody take a look at my configuration 
file as following, Thanks a lot !

Besides, will a JDBCCacheLoader provide  better performance ? It will be 
greatly appreciated if somebody can provide samples for that .

=========== jbosscache-config.xml ==========
  | 
  | <server>
  | 
  | <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
  | 
  |  <mbean code="org.jboss.cache.TreeCache" 
name="jboss.cache:service=TreeCache">
  | 
  |    <depends>jboss:service=Naming</depends>
  |    <depends>jboss:service=TransactionManager</depends>
  | 
  |   <attribute 
name="TransactionManagerLookupClass">org.jboss.cache.DummyTransactionManagerLookup</attribute>
  | 
  |   <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
  | 
  |   <attribute name="CacheMode">LOCAL</attribute>
  | 
  |    <attribute name="ClusterName">TreeCache-Cluster</attribute>
  | 
  |    <attribute name="ClusterConfig">
  |                  <config>
  |                     <!-- UDP: if you have a multihomed machine,
  |                                     set the bind_addr attribute to the 
appropriate NIC IP address
  |                     -->
  |                     <!-- UDP: On Windows machines, because of the media 
sense feature
  |                                      being broken with multicast (even 
after disabling media sense)
  |                                      set the loopback attribute to true
  |                     -->
  |                     <UDP mcast_addr="228.1.2.3" mcast_port="45566" 
ip_ttl="64" ip_mcast="true"
  |                        mcast_send_buf_size="150000" 
mcast_recv_buf_size="80000" ucast_send_buf_size="150000"
  |                        ucast_recv_buf_size="80000" loopback="false" />
  |                     <PING timeout="2000" num_initial_members="3" 
up_thread="false" down_thread="false" />
  |                     <MERGE2 min_interval="10000" max_interval="20000" />
  |                     <FD shun="true" up_thread="true" down_thread="true" />
  |                     <VERIFY_SUSPECT timeout="1500" up_thread="false" 
down_thread="false" />
  |                     <pbcast.NAKACK gc_lag="50" max_xmit_size="8192" 
retransmit_timeout="600,1200,2400,4800" up_thread="false"
  |                        down_thread="false" />
  |                     <UNICAST timeout="600,1200,2400" window_size="100" 
min_threshold="10" down_thread="false" />
  |                     <pbcast.STABLE desired_avg_gossip="20000" 
up_thread="false" down_thread="false" />
  |                     <FRAG frag_size="8192" down_thread="false" 
up_thread="false" />
  |                     <pbcast.GMS join_timeout="5000" 
join_retry_timeout="2000" shun="true" print_local_addr="true" />
  |                     <pbcast.STATE_TRANSFER up_thread="false" 
down_thread="false" />
  |               </config>
  |             </attribute>
  | 
  |    <attribute name="SyncReplTimeout">10000</attribute> 
  | 
  |     <attribute name="LockAcquisitionTimeout">15000</attribute>
  | 
  |    <attribute name="EvictionPolicyClass"></attribute>
  | 
  |    <attribute name="CacheLoaderConfiguration">
  |             <config>
  |                 <passivation>false</passivation>
  |                 <preload>/test</preload>
  |      <shared>false</shared>
  |                 
  |                 <cacheloader>
  |                     <class>org.jboss.cache.loader.FileCacheLoader</class>
  |                      <properties>
  |                         location=/tmp/filetore
  |                     </properties>
  |                     <async>true</async>
  |                     
  |                     <fetchPersistentState>true</fetchPersistentState>
  |                     <ignoreModifications>false</ignoreModifications>
  |                      <purgeOnStartup>false</purgeOnStartup>
  |                 </cacheloader>
  |                 
  |          </config>
  |     </attribute>
  |     
  |     </mbean>
  | </server>


===== Testing Program =====
  | 
  | TreeCache cache = new TreeCache();
  | PropertyConfigurator pc = new PropertyConfigurator();
  | pc.configure(cache, "jbosscache-config.xml");
  |             
  | cache.createService();
  | cache.startService();
  | 
  | cache.put("/test", key, obj );
  | 
  | ....



 [img][/img][img][/img]

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957787#3957787

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957787
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to