Hi! I am trying to configure and test my custom memory policy for the simple
1 client - 1 server node topology.

In order to do this I added memory configuration for my server node like
this with 1GB_Region_Eviction memory policy configured.

        <property name="memoryConfiguration">
            <bean
class="org.apache.ignite.configuration.MemoryConfiguration">
                
                <property name="pageSize" value="#{16 * 1024}"/>

                <property name="memoryPolicies">
                    <list>
                        <bean
class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
                            <property name="name"
value="1GB_Region_Eviction"/>
                            <property name="metricsEnabled" value="true" />
                            <property name="initialSize" value="#{250 * 1024
* 1024}"/>
                            <property name="maxSize" value="#{1l * 1024 *
1024 * 1024}"/>
                            <property name="pageEvictionMode"
value="RANDOM_2_LRU"/>
                        </bean>

                    </list>
                </property>
            </bean>
        </property>

My client node connects to server and starts putting new entries with size ~
2MB to cache with interval in 1 sec. See client config below.
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="clientMode" value="true"/>
        
        <property name="peerClassLoadingEnabled" value="true"/>

        <property name="cacheConfiguration">
            <list>
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="MyCache1"/>
                    <property name="statisticsEnabled" value="true" />
                    <property name="rebalanceMode" value="SYNC"/>
                    <property name="memoryPolicyName"
value="1GB_Region_Eviction"/>

                    <property name="writeSynchronizationMode"
value="FULL_SYNC"/>
                    <property name="backups" value="0"/>
                    <property name="eagerTtl" value="false"/>
                    <property name="expiryPolicyFactory">
                        <bean class="javax.cache.expiry.CreatedExpiryPolicy"
factory-method="factoryOf">
                            <constructor-arg value="THIRTY_MINUTES"/>
                        </bean>
                    </property>
                </bean>
            </list>
        </property>
...
    </bean> 

I've got message in server node log like this
[12:34:16,622][INFO][sys-stripe-1-#2%null%][PageMemoryNoStoreImpl] Allocated
next memory segment [plcName=1GB_Region_Eviction, chunkSize=268.4 MB]
And after this no more memory chunks allocated by node. And my maxSize
ignored by cache.
What am I doing wrong here. Please advise.

my-client-example-memory-policies.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/n16101/my-client-example-memory-policies.xml>
  
my-example-memory-policies.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/n16101/my-example-memory-policies.xml>
  
MyMemoryPoliciesExample.java
<http://apache-ignite-users.70518.x6.nabble.com/file/n16101/MyMemoryPoliciesExample.java>
  



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Ignite-fails-to-allocate-more-memory-then-initially-allocated-when-maxSize-property-provided-in-Memon-tp16101.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to