Hi,
We have started using hazelcast version 2.6 in our projects , previously we were using coherence cache. But ,after we started using hazelcast , the performance of the system has become very slow and after a couple of days , we have to restart the nodes. And the strange thing is , there are no errors. So , is there any reason why the system performance can be slower.
Here are the details:
Basically , we use it as a cache in one component and as an asynchronous update to the database in the other. Our environment is a clustered environment.
1).Component where it is used as cache:
Max entries : 5,000,000.
No of maps : 1
Contents of map : A POJO as a key with 3 variables. No value
Frequency of reading from cache : very high.
Configuration file :
<bean id="XYZ" class="ClassName">
<constructor-arg index="0"><ref bean="hazelcastInstance"/></constructor-arg>
<constructor-arg index="1" value="Map" />
</bean>
<hz:hazelcast id="hazelcastInstance">
<hz:config>
<hz:group name="Groupname" password="password"/>
<hz:properties>
<hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property>
<hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property>
<hz:property name="hazelcast.version.check.enabled">false</hz:property>
</hz:properties>
<hz:network port="port" port-auto-increment="true">
<hz:join>
<hz:multicast enabled="true"
multicast-group="ip"
multicast-port="port"/>
</hz:join>
</hz:network>
<hz:map name="Map"
backup-count="1"
read-backup-data="true"
cache-value="true"
time-to-live-seconds="86400"
max-size="5000000"
eviction-percentage="25"
eviction-policy="LRU"
eviction-delay-seconds="3"
merge-policy="hz.LATEST_UPDATE"/>
</hz:config>
</hz:hazelcast>
2). Component where it is used as persistance store. We use a backup map and write the cache data to the database every 180 seconds and delete the entries in the cache.
Max entries : 5,000,000.
No of maps : 1
Contents of map : An integer as a key and a bigger object as value.
Frequency of reading from cache : high.
Frequency of writing to cache : high.
Configuration file :
<bean id="Cache" class="Classname">
<constructor-arg index="0"><ref bean="hazelcastInstance"/></constructor-arg>
<constructor-arg index="1" value="Map" />
</bean>
<hz:hazelcast id="hazelcastInstance">
<hz:config>
<hz:group name="cluster group" password="cluster.group.password"/>
<hz:properties>
<hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property>
<hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property>
<hz:property name="hazelcast.version.check.enabled">false</hz:property>
</hz:properties>
<hz:network port="cluster.instance.port" port-auto-increment="cluster.instance.autoincrement">
<hz:join>
<hz:multicast enabled="cluster.group.multicast.enabled"
multicast-group="cluster.group.multicast.ip"
multicast-port="cluster.group.multicast.por}"/>
</hz:join> </hz:network>
<hz:map name="Map"
backup-count="1"
read-backup-data="true"
cache-value="true"
max-size="5000000"
eviction-percentage="25"
eviction-policy="LRU"
eviction-delay-seconds="3"
merge-policy="hz.LATEST_UPDATE">
<hz:map-store enabled="true" write-delay-seconds="180" class-name="DBCacheStore">
</hz:map-store>
</hz:map>
</hz:config>
</hz:hazelcast>
I know , it is very difficult to know what the exact problem could be without any error occuring , but could it be the case where hazelcast consumes too much memory and garbage collection is not that efficient?
Regards,
Shankar