java - Ignite doesn't free memory after cache destroy -


i'm using ignite engine bean inside spring boot web application. cache configuration follows:

<bean id="ignite" class="org.apache.ignite.ignitespringbean"> <property name="configuration">     <bean id="ignite.cfg" class="org.apache.ignite.configuration.igniteconfiguration">         <property name="cacheconfiguration">             <list>                 <bean class="org.apache.ignite.configuration.cacheconfiguration">                     <property name="atomicitymode" value="transactional" />                     <property name="cachemode" value="partitioned" />                     <property name="backups" value="0" />                     <property name="startsize" value="#{1024*16}" />                     <property name="memorymode" value="offheap_tiered" />                      <property name="offheapmaxmemory" value="#{1 * 1024l * 1024l * 1024l}" />                     <property name="swapenabled" value="true" />                     <property name="evictsynchronized" value="true" />                 </bean>             </list>         </property>           <property name="swapspacespi">             <bean class="org.apache.ignite.spi.swapspace.file.fileswapspacespi">                 <property name="basedirectory" value="..." />             </bean>         </property> 

here default memory usage after start engine 0.5gb heap: enter image description here

now @ point i'm expecting maximum memory usage 2.6 gb since set off-heap max memory 1 gb. here happens after load million objects cache! enter image description here

what's worse is, destroy cache memory usage still there! enter image description here

at point if try load more entries cache, memory usage keeps growing, proving ignite didn't free cache destroyed earlier.

edit

i uploaded maven test project along output http://sourceforge.net/projects/ignitetest35087485/files/. see, depleted memory after 5 cycles of load-destroy. eviction swap space did not take place , ignite didn't take offheapmaxmemory setting account.

what problem here? appreciated.

the way worked me call cache#removeall + ignite#destroycache + ignite#createcache. able create new cache new/updated config , unlocking outdated off-heap memory before creating new cache. allows shrink , grow amount of memory need. if know have absolute max. , no need shrink it, can configure off-heap-max-memory (+ evictionpolicy , expirypolicy) , unused space re-used (you won't on off-heap-max-memory, cache won't shrink).


Comments