Slow performance with very simple test

436 views
Skip to first unread message

Gandalf

unread,
Sep 1, 2010, 7:05:45 AM9/1/10
to Hazelcast
Hello,
I try to execute a very simple test and I am surprise of results:

Map<String, String> cacheHazelcast = Hazelcast.getMap(CACHE_NAME +
CACHE_TYPE);
long start = System.nanoTime();
for (int i = 0; i < 1000000; i++){
cacheHazelcast.put("key"+i, "value"+i);
}
long end = System.nanoTime();
System.out.println(cacheHazelcast.size());
System.out.println(end - start + " ns");
start = System.nanoTime();
Object tempItem = null;
for (int i = 0; i < 1000000; i++){
tempItem = cacheHazelcast.get("key"+i);
}
end = System.nanoTime();
System.out.println(end - start + " ns");

On my machine (laptop Intel CORE2 Duo) P8400 @2.26GHz with 4Gb di RAM
(JVM started with 1GB) the elapsed time is:
put : 21911479532 ns = 21,92 sec
get: 20587488912 ns = 20,59 sec

I use a single JVM and not cluster.
version : hazelcast-1.9-SNAPSHOT.jar

This situation is it normal?

Thanks a lot

Talip Ozturk

unread,
Sep 1, 2010, 4:51:22 PM9/1/10
to haze...@googlegroups.com
That is normal. Planes aren't fast on the ground because they are
designed to perform well on the sky. Hazelcast is not developed for
single node; it is developed for scalability. Run Hazelcast on 10 node
cluster and see if any other alternative can perform better.

twitter @oztalip

> --
> You received this message because you are subscribed to the Google Groups "Hazelcast" group.
> To post to this group, send email to haze...@googlegroups.com.
> To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages