Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 2980 invoked from network); 3 Jul 2006 17:29:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jul 2006 17:29:58 -0000 Received: (qmail 85047 invoked by uid 500); 3 Jul 2006 17:29:53 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 85011 invoked by uid 500); 3 Jul 2006 17:29:53 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 84996 invoked by uid 99); 3 Jul 2006 17:29:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jul 2006 10:29:52 -0700 X-ASF-Spam-Status: No, hits=1.1 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_00_10,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of erickerickson@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO py-out-1112.google.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jul 2006 10:29:52 -0700 Received: by py-out-1112.google.com with SMTP id d80so1558773pyd for ; Mon, 03 Jul 2006 10:29:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=tDoRnhENN1y1UR+mTvPhlp2OZ+wzvN8kqk4CuCJFRptRZuiOPLdIGR6kUcxfwG/dpuuJvGWFsNqzlCiN7PdThqVMXLYDD/z8ndkLICj8khlXmqH4TrxpNYXdBvxHovQcN5oizI54iTRFSges+Ol8KmOC15oseDibmRXxZwrYTN4= Received: by 10.35.121.9 with SMTP id y9mr2940230pym; Mon, 03 Jul 2006 10:29:31 -0700 (PDT) Received: by 10.35.31.4 with HTTP; Mon, 3 Jul 2006 10:29:31 -0700 (PDT) Message-ID: <359a92830607031029m3a44fb4fo33313651c76f0aa5@mail.gmail.com> Date: Mon, 3 Jul 2006 13:29:31 -0400 From: "Erick Erickson" To: java-user@lucene.apache.org Subject: Re: Memory Leak IndexSearcher In-Reply-To: <9cde41450607030742jb64b0c0p71d4732ba5bc132c@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17223_16689495.1151947771573" References: <9cde41450607030742jb64b0c0p71d4732ba5bc132c@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_17223_16689495.1151947771573 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Well, *assuming* that you're working in Java, you can't predict very much about when the garbage collector actually goes about freeing memory. Depending on how memory is measured, you may or may not be getting an accurate count. I wonder what would happen if you allowed the JVM only a *little* more memory than you need. I suspect that you'd see memory increase to the maximum then fluctuate near the max forever as the gc would then be forced to collect the memory that was being marked as free (but not necessarily returned to the heap by the GC promptly) by re-opening the IndexSearcher. Hope this helps Erick ------=_Part_17223_16689495.1151947771573--