You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2015/08/05 00:09:31 UTC

[Solr Wiki] Update of "ShawnHeisey" by ShawnHeisey

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "ShawnHeisey" page has been changed by ShawnHeisey:
https://wiki.apache.org/solr/ShawnHeisey?action=diff&rev1=46&rev2=47

Comment:
Cleaned up and expanded the "Why is tuning necessary?" paragraph.

  
  === Why is tuning necessary? ===
  
- First you must understand how Java's memory model works, and what "[[http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29|garbage collection]]" actually means.  Java's default garbage collector is designed to do a decent job for a typical program workload, but when faced with the way that Solr uses memory, does a terrible job that results in full garbage collections and very long program pauses.  There are other collector implementations, such as CMS and G1, but even these collectors result in long pauses if they are left at their default settings.
+ First you must understand how Java's memory model works, and what "[[http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29|garbage collection]]" actually means.  Java's default garbage collector is designed to do a decent when the major concern of your program is throughput -- how fast it can transfer data.  If a high-throughput program pauses for several seconds, that's no big deal, as long as it is pumping data quickly the rest of the time.  Good Solr performance requires optimizing for a different metric -- latency.  The jobs that Solr is doing must complete very quickly, or the user experience is horrible.  Java's default collector has all the wrong optimizations for Solr -- full garbage collections happen relatively frequently, so Solr just sits doing nothing at all for many seconds.  There are other collector implementations, such as CMS and G1, but even these collectors result in long pauses if they are left at their default settings.  Further tuning is required.
  
  === G1 (Garbage First) Collector ===