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 2995F200CA3 for ; Wed, 3 May 2017 04:47:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 28192160BAC; Wed, 3 May 2017 02:47:08 +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 6E631160B9D for ; Wed, 3 May 2017 04:47:07 +0200 (CEST) Received: (qmail 12422 invoked by uid 500); 3 May 2017 02:47:05 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 12407 invoked by uid 99); 3 May 2017 02:47:05 -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; Wed, 03 May 2017 02:47:05 +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 CDE7E1A0899 for ; Wed, 3 May 2017 02:47:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.396 X-Spam-Level: X-Spam-Status: No, score=-0.396 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=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id jZbyuNSrN65C for ; Wed, 3 May 2017 02:47:03 +0000 (UTC) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id EDCBF5F3BB for ; Wed, 3 May 2017 02:47:02 +0000 (UTC) Received: by mail-wr0-f170.google.com with SMTP id z52so95497843wrc.2 for ; Tue, 02 May 2017 19:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=kWGidD6otAwrg1fCG9uLCDfnUGuQvk7SwTzajG96YgU=; b=nwK4lCQ1tppTOIMT0Ke4FMeB9tLYJJEld/wL63QbFB2EzG3mCaMG6W23IAxEult9KJ IOanh2C8EpJZga9HpdSDVWczwU8uPlDWDyaHU6tsrwbXsEPGRGTmCmlu03mHeE2HKmRj NkWrXmxgNLkxidiFgJGCDES//EDYTKvx1O9zJMPTFq/6pQJOnUyJC8WjcXgKtvwV67GK 0Zd7XibB6tJAYLh/SmQIR77inAqz9A2wHaGrvm8nX3/H+0hRkmGjswan/DtW78gN3Nt3 Vb98iNNymUh7K9/Kf/JP0sCBZ6E7iT95ViZisWxd9RkbRQA9CcU5Ql6DRHTRvg7lQINi SZ8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=kWGidD6otAwrg1fCG9uLCDfnUGuQvk7SwTzajG96YgU=; b=AiATIZJwgiNB6R+0PqigCbh0EU7cxQ/rW23gDY4MFNI0uH9PE1GNxUtCa4/DeHGKC1 X3L3BHOYDkYRdKmfpcYL416NiYHZkkJUHR9bg9CkfnTeKkRffdbjQVFQ4o+xPZXa1sxH 9dHcZuOviezVLRd4w3/Yzrli6h54z4kIAySz2xPPCiOQSfvhPKABn3CGNd0ho3OAVS4S vQ/eMzJe71sHmlfzsRJbxaGyJFgZWUcpFxOQzciBSgTRHV5wGWaSxlNHOoFlRoBnhY9g h/HguCOgQyHMo47JqNjh81jcD3ajx0UASCO/BUmit+1WHYKKkfLNnW74c9pjNPAe/QhF ozHQ== X-Gm-Message-State: AN3rC/6/5JLagc3b+lGHPYvxFw8caxnhquRDuoeBA6dYx2Duk0MKxrnz ahuxQJPJYYV8MCyUF0oWHztu8NSAVksz X-Received: by 10.46.82.154 with SMTP id n26mr132658lje.61.1493779621704; Tue, 02 May 2017 19:47:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.20.22 with HTTP; Tue, 2 May 2017 19:47:01 -0700 (PDT) In-Reply-To: <18d72d99-3eff-b46a-c618-178716e0959c@elyograg.org> References: <18d72d99-3eff-b46a-c618-178716e0959c@elyograg.org> From: Damien Kamerman Date: Wed, 3 May 2017 12:47:01 +1000 Message-ID: Subject: Re: Suggester uses lots of 'Page cache' memory To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a113ca9e2b97d1b054e95ab13 archived-at: Wed, 03 May 2017 02:47:08 -0000 --001a113ca9e2b97d1b054e95ab13 Content-Type: text/plain; charset=UTF-8 Thanks Shawn, I'll have to look closer into this. On 3 May 2017 at 12:10, Shawn Heisey wrote: > On 5/2/2017 6:46 PM, Damien Kamerman wrote: > > Shalin, yes I think it's a case of the Suggester build hitting the index > > all at once. I'm thinking it's hitting all docs, even the ones without > > fields relevant to the suggester. > > > > Shawn, I am using ZFS, though I think it's comparable to other setups. > > mmap() should still be faster, while the ZFS ARC cache may prefer more > > memory that other OS disk caches. > > > > So, it sounds like I enough memory/swap to hold the entire index. When > will > > the memory be released? On a commit? > > https://lucene.apache.org/core/6_5_0/core/org/apache/ > lucene/store/MMapDirectory.html > > talks about a bug on the close(). > > What I'm going to describe below is how things *normally* work on most > operating systems (think Linux or Windows) with most filesystems. If > ZFS is different, and it sounds like it might be, then that's something > for you to discuss with Oracle. > > Normally, MMap doesn't *allocate* any memory -- so there's nothing to > release later. It asks the operating system to map the file's contents > to a section of virtual memory, and then the program accesses that > memory block directly. > > http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html > > A typical OS takes care of translating accesses to MMap virtual memory > into disk accesses, and uses available system memory to cache the data > that's read so a subsequent access of the same data is super fast. > > On most operating systems, memory in the disk cache is always available > to programs that request it for an allocation. > > ZFS uses a completely separate piece of memory for caching -- the ARC > cache. I do not know if the OS is able to release memory from that > cache when a program requests it. My experience with ZFS on Linux (not > with Solr) suggests that the ARC cache holds onto memory a lot tighter > than the standard OS disk cache. ZFS on Solaris might be a different > animal, though. > > I'm finding conflicting information regarding MMap problems on ZFS. > Some sources say that memory usage is doubled (data in both the standard > page cache and the arc cache), some say that this is not a general > problem. This is probably a question for Oracle to answer. > > You don't want to count swap space when looking at how much memory you > have. Swap performance is REALLY bad. > > Thanks, > Shawn > > --001a113ca9e2b97d1b054e95ab13--