title: Setting ratio of Young and Tenure generation in JVM for a String processing app
body: <p>I have an app which groups array of strings based on their similarity. It is exposed from a TomCat server and the start params are</p>
  
  <pre><code>/usr/lib/jvm/java/bin/java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/username/shared/log/heapdump.log -XX:-UseAdaptiveSizePolicy -XX:NewRatio=3 -Xms8192M -Xmx8192M -XX:+UseParNewGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/home/username/shared/log/gc.log -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7896 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -classpath :/usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat7/temp -Djava.util.logging.config.file=/usr/share/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start 
  </code></pre>
  
  <p>My GC log goes something like</p>
  
  <pre><code>316.795: [GC 316.795: [ParNew: 233516K-&gt;15658K(249216K), 0.0143200 secs] 1899624K-&gt;1683370K(8360960K), 0.0143830 secs] [Times: user=0.17 sys=0.00, real=0.02 secs]
  </code></pre>
  
  <p>I am constantly getting (concurrent mode failure) error in my GC log. I believe, it's because the size of Young Generation is very small. I am trying to set the ratio of Young Generation to New generation as 3:1, but as can be seen from the log, the size of young generation is still 249216K.</p>
  
  <p>Why is JVM not respecting the <code>-XX:NewSize</code> option?</p>