Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8B13920049E for ; Thu, 10 Aug 2017 19:47:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8812816AE15; Thu, 10 Aug 2017 17:47:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 80F4816ADEE for ; Thu, 10 Aug 2017 19:47:15 +0200 (CEST) Received: (qmail 55060 invoked by uid 500); 10 Aug 2017 17:47:13 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 55049 invoked by uid 99); 10 Aug 2017 17:47:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2017 17:47:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DFFB61A05F1 for ; Thu, 10 Aug 2017 17:47:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.173 X-Spam-Level: **** X-Spam-Status: No, score=4.173 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HTML_MESSAGE=2, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id G8fmNejOq3jp for ; Thu, 10 Aug 2017 17:47:10 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id B74D25F6BF for ; Thu, 10 Aug 2017 17:47:09 +0000 (UTC) Received: from static.162.255.23.37.macminivault.com (unknown [162.255.23.37]) by mwork.nabble.com (Postfix) with ESMTP id 2A5B45AE5A6B3 for ; Thu, 10 Aug 2017 10:47:09 -0700 (MST) Date: Thu, 10 Aug 2017 10:47:09 -0700 (MST) From: afedotov To: user@ignite.apache.org Message-ID: In-Reply-To: <1502380737740-16101.post@n6.nabble.com> References: <1502380737740-16101.post@n6.nabble.com> Subject: Re: Ignite fails to allocate more memory then initially allocated when maxSize property provided in MemoryPolicyConfiguration MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_75892_1782712204.1502387229164" archived-at: Thu, 10 Aug 2017 17:47:16 -0000 ------=_Part_75892_1782712204.1502387229164 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, Provided configuration works as expected on Ignite version 2.1. On my side, in this configuration, I got 3 memory segment allocations. Have you tried requesting cache.size() after populating the cache? Please provide the full configuration files so as I could check them. Kind regards, Alex. On Thu, Aug 10, 2017 at 6:58 PM, smironchyk [via Apache Ignite Users] < ml+s70518n16101h65@n6.nabble.com> wrote: > 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. > > > > > > > > > > value="1GB_Region_Eviction"/> > > > > value="RANDOM_2_LRU"/> > > > > > > > > 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. > > > > > > > > > > > > value="1GB_Region_Eviction"/> > > value="FULL_SYNC"/> > > > > factory-method="factoryOf"> > > > > > > > ... > > > 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 > > my-example-memory-policies.xml > > MyMemoryPoliciesExample.java > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > 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 > To start a new topic under Apache Ignite Users, email > ml+s70518n1h65@n6.nabble.com > To unsubscribe from Apache Ignite Users, click here > > . > NAML > > -- 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-tp16101p16105.html Sent from the Apache Ignite Users mailing list archive at Nabble.com. ------=_Part_75892_1782712204.1502387229164 Content-Type: text/html; charset=UTF8 Content-Transfer-Encoding: quoted-printable
Hi,

Provided configuration works as expected on Ign= ite version 2.1.
On my side, in this configuration, I got 3 memory segme= nt allocations.

Have you tried requesting cache.size() after populat= ing the cache?
Please provide the full configuration files so as I could= check them.

Kind regards,
Alex.

On Thu, Aug 10, 2017 at 6:58 PM, smironchyk = [via Apache Ignite Users] <[hidden email]> wrote:
=09Hi! I am trying to configure and test my custom memory policy for the si= mple 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.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"memoryConfigu= ration">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <bean clas= s=3D"org.apache.ignite.configuration.MemoryConfiguration&quo= t;>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D&q= uot;pageSize" value=3D"#{16 * 1024}"/>

=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"mem= oryPolicies">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 <list>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <bean class=3D"org.ap= ache.ignite.configuration.MemoryPolicyConfiguration">
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"name" value=3D"= ;1GB_Region_Eviction"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property na= me=3D"metricsEnabled" value=3D"true" />
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 <property name=3D"initialSize" value=3D"= ;#{250 * 1024 * 1024}"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property na= me=3D"maxSize" value=3D"#{1l * 1024 * 1024 * 1024}"/>= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"pageEvictionMode"= ; value=3D"RANDOM_2_LRU"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </bean>

= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </= list>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </pr= operty>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </bean>
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 </property>

My client node connect= s to server and starts putting new entries with size ~ 2MB to cache with in= terval in 1 sec. See client config below.
<bean class=3D"org.apache.ignite.configuration.Ignite= Configuration">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D= "clientMode" value=3D"true"/>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"peerCl= assLoadingEnabled" value=3D"true"/>

=C2=A0 =C2=A0 = =C2=A0 =C2=A0 <property name=3D"cacheConfiguration">
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <list>
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <bean class=3D"org.apache.ignit= e.configuration.CacheConfiguration">
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D&q= uot;name" value=3D"MyCache1"/>
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"= statisticsEnabled" value=3D"true" />
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D&q= uot;rebalanceMode" value=3D"SYNC"/>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D&q= uot;memoryPolicyName" value=3D"1GB_Region_Eviction"/>
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &= lt;property name=3D"writeSynchronizationMode" value=3D"= FULL_SYNC"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 <property name=3D"backups" value=3D"= 0"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 <property name=3D"eagerTtl" value=3D"false&quo= t;/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 <property name=3D"expiryPolicyFactory">
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 <bean class=3D"javax.cache.expiry.CreatedExpiryPolicy"= ; factory-method=3D"factoryOf">
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <= constructor-arg value=3D"THIRTY_MINUTES"/>
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </= bean>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 </property>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 </bean>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </= list>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 </property>
...
=C2=A0 =C2=A0 </bean>=C2=A0

I've got message in server node log like this
[12:34:16,622][INFO][sys-stripe-1-#2%null%][PageMemoryNoStore= Impl] Allocated next memory segment [plcName=3D1GB_Region_Eviction, chunkSi= ze=3D268.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.xmlmy= -example-memory-policies.xmlMyMemoryPoliciesExample.java =09 =09 =09 =09
=09
=09
=09
=09
=09=09To start a new topic under Apache Ignite Users, email [hidden email]
=09=09To unsubscribe from Apache Ignite Users, click here.
=09=09NAML =09

=09 =09 =09

View this message in context: Re: Ignite fail= s to allocate more memory then initially allocated when maxSize property pr= ovided in MemoryPolicyConfiguration
Sent from the A= pache Ignite Users mailing list archive at Nabble.com.
------=_Part_75892_1782712204.1502387229164--