Walter Underwood wrote:
Also, only use as much heap as you really need. A larger heap
means longer GCs.
Right. Ideally you want to figure out how to get longer pauses down. There is a lot of fiddling that you can do to improve gc times.

On a multiprocessor machine you can parallelize collection of both the new and tenured spaces for a nice boost. You can resize spaces within the heap as well. There is also a low pause incremental collector you can try. A lot of this type of tuning takes trial and error and experience though. A really helpful tool is visualgc, which lets you watch garbage collection for your app in realtime. You can also use jconsole and other tools like that, but visualgc actually renders a view of the heap and its easier to watch and get a feel for how garbage collection is working. If its hard to get a GUI up, all of those tools work remotely as well.

You can find a lot of good info on things to try here:

http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

If there are spots in Lucene/Solr that are producing so much garbage that we can't keep up, perhaps work can be done to address this upon pinpointing the issues.

- Mark

Reply via email to