Hi Team,
Could some one help me with below confusion? I really don't understand why Hazelcast vs Ignite put timings are varying so much. [8.33 Mins vs 15 Seconds]
Hazelcast:
I am trying to run simple test with Hazelcast 3.6 and observing put/s statistics from Management Center. Person class is using "StreamSeriazer" [Though I tried first using plain java serialization as well]
/*
Person class: [Backup count is set as 0]
public Person(String personId, String personName, int age, String address, String cellNumber, String companyWorking,
long salary, boolean isMarried, boolean ownsTwoWheeler, boolean ownsFourWheeler, int numOfDependands)
*/
HazelcastInstance hz = HazelcastClient.newHazelcastClient();
IMap<Integer, Person> personMap = hz.getMap("person");
System.out.println("** Entering into critical section ***");
long time = System.currentTimeMillis();
final int iterations = 1000000;
for(int i=0;i<iterations;i++) {
personMap.put(i, new Person(String.valueOf(i),"Person"+i,i,"Address"+i,"99309271"+i,"JPMC"+i,(2000+1)*(i+1),true,false,false,i+1));
}
long time1 = System.currentTimeMillis();
System.out.println("** Put time : " + (time1-time) + " **");
Output:
** Entering into critical section ***
** Put time : 536168 **
From Management Center:
Total Heap : 6060 MB
Used Heap : 624 MB
Heap Usage Percentage : 11%
Put/s statistics : Average 1700 puts per second , latency : 0.02 ms
Apache Ignite:
Ignite ignite = Ignition.start("appContext.xml");
IgniteCache<Integer, Person> cache = ignite.getOrCreateCache("SampleCache");
Thread.sleep(15000);
System.out.println("** Entering into critical section ***");
long time = System.currentTimeMillis();
final int iterations = 1000000;
for(int i=0;i<iterations;i++) {
cache.put(i, new Person(String.valueOf(i),"Person"+i,i,"Address"+i,"99309271"+i,"JPMC"+i,(2000+1)*(i+1),true,false,false,i+1));
}
long time1 = System.currentTimeMillis();
System.out.println("** Put time : " + (time1-time) + " **");
System.out.println("Size is:" + cache.size(CachePeekMode.ALL));
Output:
** Put time : 15795 **
Size is:1000000
May 20, 2016 5:43:51 PM org.apache.ignite.logger.java.JavaLogger info
INFO:
Metrics for local node (to disable set 'metricsLogFrequency' to 0)
^-- Node [id=8d25690b, name=null]
^-- H/N/C [hosts=1, nodes=1, CPUs=12]
^-- CPU [cur=0.17%, avg=0.71%, GC=0%]
^-- Heap [used=880MB, free=85.47%, comm=6060MB]
^-- Public thread pool [active=0, idle=24, qSize=0]
^-- System thread pool [active=0, idle=24, qSize=0]
^-- Outbound messages queue [size=0]
Thanks,
Dharam