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 2013/10/24 06:12:15 UTC

[Solr Wiki] Update of "SolrPerformanceProblems" by OtisGospodnetic

Dear Wiki user,

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

The "SolrPerformanceProblems" page has been changed by OtisGospodnetic:
https://wiki.apache.org/solr/SolrPerformanceProblems?action=diff&rev1=18&rev2=19

  
  The short version: This is one of those questions that has no generic answer.  You want a heap that's large enough so that you don't have [[SolrPerformanceFactors#OutOfMemoryErrors|OutOfMemory]] (OOM) errors and problems with constant garbage collection, but small enough that you're not wasting memory or running into huge garbage collection pauses.
  
- The long version: You'll have to experiment.  Java comes with two GUI tools ([[http://docs.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html|jconsole]] and [[http://docs.oracle.com/javase/6/docs/technotes/tools/share/jvisualvm.html|jvisulavm]]) that you can connect to the running instance of Solr and see how much heap gets used over time.
+ The long version: You'll have to experiment.  Java comes with two GUI tools ([[http://docs.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html|jconsole]] and [[http://docs.oracle.com/javase/6/docs/technotes/tools/share/jvisualvm.html|jvisulavm]]) that you can connect to the running instance of Solr and see how much heap gets used over time. For longer-term JVM heap, memory spaces, and garbage collection monitoring, you can use tools like [[http://sematext.com/spm|SPM]]. The post on [[http://blog.sematext.com/2013/10/21/jvm-memory-pool-monitoring/|JVM Memory Pool Monitoring]] shows what to look for in memory pool reports to avoid OOME.
  
  The chart in [[http://docs.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html#memory|this jconsole example]] shows a typical sawtooth pattern - memory usage climbs to a peak, then garbage collection frees up some memory.  Figuring out how many collections is too many will depend on your query/update volume.  One possible rule of thumb:  Look at the number of queries per second Solr is seeing.  If the number of garbage collections per minute exceeds that value, your heap MIGHT be too small.