Or simply attach to the JVM with Jconsole and watch the GC from there. You'd have to watch things (logs and jconsole) closely though, and correlate the slow query periods with a GC spike.
Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- > From: Ed Summers <e...@pobox.com> > To: solr-user@lucene.apache.org > Sent: Wednesday, July 22, 2009 11:03:08 AM > Subject: Re: Random Slowness > > On Wed, Jul 22, 2009 at 10:44 AM, Jeff Newburnwrote: > > How do I go about enabling the gc logging for solr? > > It depends how you are running solr. You basically want to make sure > that when the JVM is started up with the java command, that it gets > some additional arguments [1]. So for example if you are running solr > using jetty you would: > > java -verbose:gc -Xloggc:solr_gc.log -jar start.jar > > And then poke around in the log looking for garbage collection events > that take as long as the pauses you are seeing in your app. I think > there are tools that will help you analyze the log files if you need > them. If there is a correlation you'll probably want to tune your solr > memory usage with -xMx and -xMs. > > Hope this helps. > > //Ed > > [1] http://java.sun.com/javase/7/docs/technotes/tools/windows/java.html