lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Goodell" <agood...@discoverymining.com>
Subject Re: How many Searches is a Searcher Worth?
Date Fri, 06 Apr 2007 01:53:01 GMT
My approach to dealing with these kinds of issues (which has worked well for
me thus far) is:

- Run java with -XX:+HeapDumpOnOutOfMemoryError command-line option
- use jhat to inspect the heap dump, like so:
$ /usr/java/jdk1.6/bin/jhat ./java_pid1347.hprof

jhat will take a while to parse the heap dump, and will start an http
listener on port 7000 by default.

Interesting statistics can be found at the bottom of the front page.  These
will enable you to discover whether it is a memory leak in the java runtime
or in the lucene library.

- andy g



On 4/5/07, Craig W Conway <craigwconway@yahoo.com> wrote:
>
> So, forgetting the RMI stuff, I put together a test client very similar to
> the one in the book "Lucene in Action" page 182.
>
> The  client:
>
> 1. instantiates a IndexSearcher
> 2. loops through queries, searches, prints hit count, saves nothing
>
> I am only able to run through about 40 searches before I get an
> OutOfMemoryException.  JDK 1.5
>
> Because of this, I have put a counter in my search server to close and
> re-open the IndexSearcher after a certian number of searches. But this
> shouldn't be necessary right? What's eating up all the memory?
>
> Source code @ http://urbanmarsupial.com/share/TestLuceneMemory.java
>
> Any hints would be greatly appreciated!
>
> Thanks,
>
> Craig
>
> ----- Original Message ----
> From: Otis Gospodnetic <otis_gospodnetic@yahoo.com>
> To: java-user@lucene.apache.org
> Sent: Wednesday, April 4, 2007 10:39:50 AM
> Subject: Re: How many Searches is a Searcher Worth?
>
> No reason that I can think of.  What makes you think the problem is with
> the IndexSearcher?  Maybe it's something else in your code, for instance.
> Make sure you have the same version of Java on both ends of the
> call.  Also, Java 6 made our RMI calls a lot more stable than even 1.5.
>
> Otis
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> Simpy -- http://www.simpy.com/  -  Tag  -  Search  -  Share
>
> ----- Original Message ----
> From: Craig W Conway <craigwconway@yahoo.com>
> To: java-user@lucene.apache.org
> Sent: Wednesday, April 4, 2007 1:25:27 PM
> Subject: How many Searches is a Searcher Worth?
>
> I am using an RMI architecture for calling a remote service which uses an
> IndexSearcher in its own JVM. I am starting the service with the following
> provisions for memory allocation and garbage collection: java -server
> -Xmx1024m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
>
> After about 1000 search calls I start to run out of memory, and I have to
> close and re-open the IndexSearcher, loosing any cached data and filters...
> Is there any reason why I shouldn't be able to use my IndexSearcher forever,
> until I want to close it?
>
> Thanks!
>
> Craig
>
>
>
>
>
>
> ____________________________________________________________________________________
> Now that's room service!  Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
> http://farechase.yahoo.com/promo-generic-14795097
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> No need to miss a message. Get email on-the-go
> with Yahoo! Mail for Mobile. Get started.
> http://mobile.yahoo.com/mail

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message