Using Ignite 1.3.0 with Java 1.8_45 on Ubuntu 14.04
Writing a micro service using vertx.io. I can't seem to get the performance
right with off_heap memory.
I have the following cache....
private static IgniteCache<String, HashSet<String>> cache;
And it's configured as follows during application startup...
IgniteConfiguration igniteCfg = new IgniteConfiguration();
igniteCfg.setMarshaller(new OptimizedMarshaller(true));
CacheConfiguration<String, HashSet<String>> myCfg = new
CacheConfiguration<>("cache");
myCfg.setCacheMode(CacheMode.PARTITIONED);
myCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
myCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
myCfg.setOffHeapMaxMemory(16 * 1024L * 1024L * 1024L);
myCfg.setBackups(0);
ignite = Ignition.start(igniteCfg);
cache = ignite.getOrCreateCache("cache");
Inside my "web/http" handler I have...
String key = body.getString("key");
String value = body.getString("value");
HashSet<String> values = cache.get(key);
if(values == null)
{
values = new HashSet<String>();
}
values.add(value);
cache.put(key, values);
myWebHandler.reply(new JsonObject().put(key, values.size()));
I start my application with -Xmx1g.
At about 2 million records the application becomes extremely slow. I.e: It
goes from 12K requests/sec to not even 30 requests/sec.
If I start with -Xmx2g then I can go to about double the records (4 million)
before it gets unresponsive.
-Xmx3g can go to 6 million and so on...
So it doesn't seem that off-heap is used. I'm I configuring something wrong?
Or is off-heap used but it's that much slower?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Can-t-seem-to-get-off-heap-memory-working-right-tp759.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.