performance: N1 --replication-->N2 -- >jdbccachestore
nikolay1981 Nov 4, 2011 11:56 AMHi!
The goal is to have background data dump by a node in a cluster into cache store to have ability recover from this store in a case of disaster.
N1 --replication-->N2 -- >jdbccachestore (mysql)
N1 runs the following code for 10 seconds
for(;;){ tm.begin cache.put tm.commit }
N2 does nothing.
In 10 seconds interval N1 puts ~100K entries into the cache. In the same interval cache in N2 gets only 1K.
When I detach jdbccachestore and run the test again N2 gets ~100K in 10 seconds interval.
In the 1st test after 10 seconds nodes are being kept alive. N2 continues to dump data into database. If I shutdown N1 then N2 stops to dump data as it’s not been committed(received?) in N2 cache .
So my point is replication is waiting while entry is persisted into a cachestore. This is strange a bit because that replication is async and cachestore is async as well.
Could you suggest anything?
Thanks a lot.
Infinispan 5.1.0 Beta.
N1 and N2 ctustering definition
<clustering mode="replication"> <async asyncMarshalling="true" useReplQueue="true" replQueueInterval="2000" replQueueMaxElements="10000"/> <stateRetrieval fetchInMemoryState="true" timeout="240000"/> </clustering> <transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup" syncRollbackPhase="false" syncCommitPhase="false" useEagerLocking="false"/>
N2 loaders configaration
<loaders passivation="false" shared="false" preload="true"> <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false"> <properties> <property name="key2StringMapperClass" value="AATwoWayKey2StringMapper"/> <property name="stringsTableNamePrefix" value="ISPN_B"/> <property name="idColumnName" value="ID"/> <property name="dataColumnName" value="DATA"/> <property name="timestampColumnName" value="TSTAMP"/> <property name="timestampColumnType" value="BIGINT"/> <property name="connectionFactoryClass" value="org.infinispan.loaders.jdbc.connectionfactory.PooledConnectionFactory"/> <property name="connectionUrl" value="jdbc:mysql://localhost:3306/mydb"/> <property name="userName" value="root"/> <property name="password" value=""/> <property name="driverClass" value="com.mysql.jdbc.Driver"/> <property name="idColumnType" value="VARCHAR(100)"/> <property name="dataColumnType" value="BLOB"/> <property name="dropTableOnExit" value="false"/> <property name="createTableOnStart" value="true"/> </properties> <async enabled="true" flushLockTimeout="15000" threadPoolSize="15"/> </loader> </loaders>