title: Is it common practice to turn on GC logging in production Java server?
body: <p>I see in a few places [1] people start the GC logging in production servers (mission critical), e.g. </p>
  
  <pre><code>java -server -Xms1024m -Xmx1024m -XX:NewSize=256m \
       -XX:MaxNewSize=256m \
       -XX:+UseConcMarkSweepGC \
       -XX:CMSInitiatingOccupancyFraction=70
       -XX:+PrintGCDetails \
       -XX:+PrintGCDateStamps \
       -XX:+PrintTenuringDistribution \
       -Xloggc:logs/gc.log \
       -Djava.awt.headless=true
       -Dcom.sun.management.jmxremote -classpath ...
  </code></pre>
  
  <p>Is it recommend practices in production env these days?</p>
  
  <p><strong>Update</strong>: I have included a link [2] from Oracle also suggest to monitor GC on production servers.</p>
  
  <p>Sources:</p>
  
  <p>[1] <a href="https://serverfault.com/questions/121490/java-opts-xxprintgcdetails-affect-on-performance">https://serverfault.com/questions/121490/java-opts-xxprintgcdetails-affect-on-performance</a></p>
  
  <p>[2] <a href="http://docs.oracle.com/cd/E24290_01/coh.371/e22838/deploy_checklist.htm#CHHFADDF" rel="noreferrer">http://docs.oracle.com/cd/E24290_01/coh.371/e22838/deploy_checklist.htm#CHHFADDF</a></p>