ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prabuddha" <prabud...@taqniatech.com>
Subject Heap memory getting increase while doing cache.get()
Date Tue, 05 Apr 2016 06:43:51 GMT
Hi, 

 

We have a simple client server mode of apache ignite and we see a memory
increase in server node heap while doing "cache.get(cacheKey)".

 

Below is our scenario. 

 

1.       First we insert a one object list with "cacheKey".

2.       Then we get it for like 200 times. In that case server node heap
memory grows and finally it shuts down. 

 

Why the heap is growing while just doing the "get(cacheKey)". 

 

Below is our cache configuration.

 

CacheConfiguration cacheCfg = new CacheConfiguration("TEST CACHE");

       cacheCfg.setExpiryPolicyFactory(FactoryBuilder.factoryOf(new
CreatedExpiryPolicy(new Duration(TimeUnit.MINUTES, 15))));

       cacheCfg.setEagerTtl(true);

       cacheCfg.setDefaultLockTimeout(2000);

       cacheCfg.setBackups(1);

       cacheCfg.setRebalanceMode(CacheRebalanceMode.ASYNC);

       cacheCfg.setCacheMode(CacheMode.PARTITIONED);

       cacheCfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);

       cacheCfg.setOffHeapMaxMemory(1*1024*1024*1024); 

       cacheCfg.setEvictSynchronized(true);

   cacheCfg.setEvictionPolicy(new LruEvictionPolicy(500));

 

 

Below is the sample code

 

IgniteCache igniteCache =
Ignition.ignite("CACHE_GRID").getOrCreateCache(cacheCfg,nearCfg);

                     

                     

       List<CacheData> cacheList = new ArrayList<CacheData>(); 

       for(int y =0;y<100;y++)

       {

              cacheList.add(new CacheData() );

       }

       System.out.println("100 objects added");

                     

       igniteCache.putIfAbsent("A", cacheList);

 

       int k =100;

       for(int i=0;i<k;i++)

       {

          igniteCache.get("A");

       }

 

Thanks and Regards,

Prabuddha


Mime
View raw message