title: How do you determine the CMSInitiatingOccupancyFraction for large Java applications?
body: <p>We are using a database (Apache Geode) that is written in Java.  Our servers have 64g of RAM, so we set our Java heap (Xms and Xmx) at about 62g of RAM.  </p>
  
  <p>Most Java recommendations I've seen for situations like these is to use the CMS garbage collector, and to set the CMSInitiatingOccupancyFraction at somewhere around 68% (give or take a little, but not much).</p>
  
  <p>But my question is:  Why can't we set garbage collection to start at 95% instead of 68%?  It seems maybe wasteful to run Java in such a fashion that you can never use more than 68% of your heap without causing non-stop Garbage Collections.</p>
  
  <p>It's bugging us because we are at a stage where our database is doing non-stop garbage collections, and it's hard to justify more RAM when really the JVM has like 18 gigs free.  :)</p>
  
  <p>Thanks in advance for any advice.</p>