Please see below > On May 13, 2017, at 11:03 AM, Ajay <ajay.b...@6dtech.co.in> wrote: > > Hi, > > Thanks for quick reply. > > Coming to question is: > > 1) I did configuration in in server node xml like > > <property name="memoryConfiguration"> > <bean class="org.apache.ignite.configuration.MemoryConfiguration"> > <property name="defaultMemoryPolicyName" value="Default_Region" > /> > <property name="pageSize" value="4096" /> > <property name="systemCacheInitialSize" value="#{40 * 1024 * > 1024}" /> > <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}" > /> > <property name="memoryPolicies"> > <list> > <bean > class="org.apache.ignite.configuration.MemoryPolicyConfiguration"> > <property name="name" > value="Default_Region" /> > <property name="initialSize" value="#{1 > * 1024 * 1024 * 1024}" /> > <property name="maxSize" value="#{2 * > 1024 * 1024 * 1024}" /> > <property name="pageEvictionMode" > value="RANDOM_2_LRU" /> > </bean> > > </list> > </property> > </bean> > </property> > > > After iam starting the server node iam getting exception > Caused by: class org.apache.ignite.IgniteCheckedException: MemoryPolicy > maxSize must not be smaller than initialSize [name=Default_Region, > initSize=1.1 GB, maxSize=-2147483648 B] > > Did i made any wrong configurations?
You overflowed integer type positive numbers range. You have to convert it to long value explicitly: <property name="maxSize" value="#{2L * 1024 * 1024 * 1024}"/> > > 2)Once region reached maximum size new data will store into default region > or one more custom region will create? As the ‘maxSize' javadoc and the documentation I shared before say: If the overall memory usage goes beyond the maximum size parameter then an out of memory exception will be thrown. To avoid this use an eviction algorithm or set the size to a bigger value. > > 2)When i saw visor command line gui it was showing entries in heap section > and off-heap is empty is any wrong configurations enabled? > > You need to set MemoryPolicyConfiguration.setMetricsEnabled to true. Read more here: https://apacheignite.readme.io/v2.0/docs/memory-and-cache-metrics#section-memory-metrics <https://apacheignite.readme.io/v2.0/docs/memory-and-cache-metrics#section-memory-metrics> If this helps then let me know. I think we need to set this parameter to true automatically if cache metrics are enabled. — Denis > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/Ignite2-0-memory-policy-tp12756p12760.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com.