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 B2589200BBA for ; Sat, 5 Nov 2016 14:23:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B0AB5160AEF; Sat, 5 Nov 2016 13:23:49 +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 CDACD160AE0 for ; Sat, 5 Nov 2016 14:23:48 +0100 (CET) Received: (qmail 51955 invoked by uid 500); 5 Nov 2016 13:23:48 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 51943 invoked by uid 99); 5 Nov 2016 13:23:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Nov 2016 13:23:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3C54CC074C for ; Sat, 5 Nov 2016 13:23:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.399 X-Spam-Level: ** X-Spam-Status: No, score=2.399 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7peS_SPR6P9p for ; Sat, 5 Nov 2016 13:23:44 +0000 (UTC) Received: from mail-vk0-f44.google.com (mail-vk0-f44.google.com [209.85.213.44]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 91F1A5F3BD for ; Sat, 5 Nov 2016 13:23:44 +0000 (UTC) Received: by mail-vk0-f44.google.com with SMTP id p9so88634269vkd.3 for ; Sat, 05 Nov 2016 06:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HOhAg4CjMVAdCT64VcYcusBCmiOxJGMLQQRga/DjhGI=; b=oKueNXzEhakw1kO/VVbY9XcakuhEkw/1JZyXoDyFalQ3PM2HkXizfKI50PDYEla1Go xjR1R+PkGHM4XvRkkoUvkg7UUh86vKLP4SPtK55MoXOojK3xjWj+XmE3i/E+rWKD39O9 UbHCsDlbuLW/mvO+0Pk+4HBQptHNyvtvEs5kFaoC7SG2iym3HkzvO9q6GNPN1thAODu2 bhrlPuBDguZv38h+x2F3Yc/n9y7pxvXM2kQIbrw0TAt+qDIVvvx0GShXeVfb4zJk9Qs9 9njXYWFIdZQO6k3fbDapaMvAAADKUegaJFi4a+CHcpx9K/g3lIQ7y8tvI1x7YZU70GN8 Rjuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HOhAg4CjMVAdCT64VcYcusBCmiOxJGMLQQRga/DjhGI=; b=Cr5XhnyNjfCr9RBIUlP+T7sCWtFt39GA7bPJbcRPjn9eUq9Y2UOpyPByRE4gBtLKUI Nz9GbZZw7YHYsJfED64u6O8WmPvUYHCFVHvLz5Czixbdih1fxKAmS7bXP09qfZUgv4RQ 5Q1Tu2DxGoDtm7YDbnllMhBjU2LaEorF4s//IZNnHDOBjqIDgEDtIlFf+uOLXi23o/Pe UQzOijFUVpChkKHB4BkUbrBuTqzXfloAwATDrenRpl9y8ttaT0iM5SPlKCxRb7TcbSnz ZIOFmOQ5iBVVHT8QGojRSRg2b3CBPXbryPpQ52QJOom0YQIvkGjuXUV8URN42ixpzdiB ZnPg== X-Gm-Message-State: ABUngvdsAHGLqVt8D5JDdrf1jQg+QoUenD9JLcLXcxvK04teeQ2I0FHtOnd7kBWq0B2ErAUzGxc0G2nXXq18Fg== X-Received: by 10.31.33.75 with SMTP id h72mr14887620vkh.0.1478352221388; Sat, 05 Nov 2016 06:23:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.90.69 with HTTP; Sat, 5 Nov 2016 06:23:00 -0700 (PDT) In-Reply-To: <0BFF7FA8-802B-4D6C-BEF3-725D7529C51D@gridgain.com> References: <0BFF7FA8-802B-4D6C-BEF3-725D7529C51D@gridgain.com> From: Sergi Vladykin Date: Sat, 5 Nov 2016 16:23:00 +0300 Message-ID: Subject: Re: Off-Heap SQL Indexes To: dev@ignite.apache.org Cc: Sergi Vladykin Content-Type: multipart/alternative; boundary=001a11c01bca02489605408db366 archived-at: Sat, 05 Nov 2016 13:23:49 -0000 --001a11c01bca02489605408db366 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Your final statement seems correct to me, but I said exactly that, I don't know where did you get that setOffHeapMaxMemory must be 0. May be you use some weird email client which renders >> signs wrong? Sergi 2016-11-04 22:25 GMT+03:00 Denis Magda : > Sergi, > > Thanks, now I found the exact conditions that switch the indexes from > on-heap to off-heap. > > But looks like you did a misprint in your conclusion saying that > setOffHeapMaxMemory should be 0. > > Thus from the user standpoint we can say, that if either > setOffHeapMaxMemory > >> =3D 0 or setMemoryMode is set to any of off-heap modes, then indexes w= ill > go > > off-heap. > > In fact, as you elaborated earlier, it has to be >=3D 0 which leads to th= e > following final statement: > > SQL engine will store indexes in the off-heap region if > setOffHeapMaxMemory parameter >=3D 0 or setMemoryMode is set to any suppo= rted > off-heap mode. It worth to mention that setOffHeapMaxMemory is set to 0 > automatically if it=E2=80=99s value is less than -1 and one of off-heap m= emory > modes is used. > > Are we on the same page now? > > =E2=80=94 > Denis > > > On Nov 4, 2016, at 1:51 AM, Sergi Vladykin > wrote: > > > > Denis, > > > > I checked the code now as well. I actually was wrong, but your statemen= t > is > > wrong either. > > > > If we are talking about indexes then the exact condition when index wil= l > be > > off-heap is the following: either setOffHeapMaxMemory >=3D 0 or > setMemoryMode > > is OFFHEAP_TIERED. > > > > But if setMemoryMode is set to one of off-heap modes and > setOffHeapMaxMemory is > > -1, then setOffHeapMaxMemory is silently getting switched to 0. > > > > Thus from the user standpoint we can say, that if either > setOffHeapMaxMemory > >> =3D 0 or setMemoryMode is set to any of off-heap modes, then indexes w= ill > go > > off-heap. > > > > Sergi > > > > 2016-11-04 6:30 GMT+03:00 Dmitriy Setrakyan : > > > >> Do we currently throw an exception if memory mode is set to off-heap b= y > the > >> max-offheap-memory is set to "-1"? Otherwise, it can get very confusin= g > to > >> users. > >> > >> On Thu, Nov 3, 2016 at 10:22 AM, Denis Magda > wrote: > >> > >>> Sergi, > >>> > >>> Referring to your response and the source code I should say that, in > >> fact, > >>> the documentation has to state the following: > >>> > >>> =E2=80=9CTo place both data and indexes in off heap memory CacheConfi= guration. > >> setMemoryMode > >>> has to be set to one of off heap modes and CacheConfiguration. > >> setOffHeapMaxMemory > >>> has to be set to a value different from -1 (disabled). If at least on= e > of > >>> these conditions is not met then both data and indexes will be locate= d > in > >>> on heap memory=E2=80=9D > >>> > >>> Is this statement correct? > >>> > >>> =E2=80=94 > >>> Denis > >>> > >>>> On Nov 3, 2016, at 2:53 AM, Sergi Vladykin > >>> wrote: > >>>> > >>>> Prachi, > >>>> > >>>> In [2] we refer to the same CacheConfiguration.setOffHeapMaxMemory > >>>> property, so [1] is correct. If setOffHeapMaxMemory is disabled (set > to > >>>> -1), then indexes will never be stored offheap, regardless of > >>> setMemoryMode > >>>> setting. > >>>> > >>>> Probably we have to change [2] to make it clear, that it is about > >>>> setOffHeapMaxMemory > >>>> but not about setMemoryMode. > >>>> > >>>> Sergi > >>>> > >>>> > >>>> 2016-11-03 2:25 GMT+03:00 Prachi Garg : > >>>> > >>>>> Engineers, > >>>>> > >>>>> I was going through documentation for Off-Heap SQL Indexes > >>>>> sql-indexes > >>> > >>> and > >>>>> found two contradicting statements- > >>>>> > >>>>> According to [1] - " `CacheConfiguration.setOffHeapMaxMemory` is > the > >>> only > >>>>> property to enable or disable off-heap indexing. While > >>>>> CacheConfiguration.setMemoryMode is used to configure off-heap > memory > >>>>> , it does > >> not > >>>>> have any effect on indexing." > >>>>> > >>>>> According to [2] - "Note that when off-heap memory is configured, > >>> Ignite > >>>>> will store query indexes off-heap as well." > >>>>> > >>>>> > >>>>> Which one is true? > >>>>> > >>>>> [1] - https://apacheignite.readme.io/docs/sql-queries#off-heap- > >>> sql-indexes > >>>>> > >>>>> [2] - http://apacheignite.gridgain.org/docs/off-heap-memory > >>>>> > >>>>> > >>>>> Thanks, > >>>>> > >>>>> -Prachi > >>>>> > >>> > >>> > >> > > --001a11c01bca02489605408db366--