title: Is JVM ARGS '-Xms1024m -Xmx2048m' still useful in Java 8?
body: <p>I have a Java 7 application using JVM ARGS: <code>-Xms1024m -Xmx2048m</code>, and it runs pretty well.</p>
  
  <p>After I upgrade to Java 8, it runs in error state with Exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
      at org.hibernate.engine.StatefulPersistenceContext.addEntry(StatefulPersistenceContext.java:466)
      at org.hibernate.engine.TwoPhaseLoad.postHydrate(TwoPhaseLoad.java:80)
      at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1439)
      at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
      at org.hibernate.loader.Loader.getRow(Loader.java:1230)
      at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
      at org.hibernate.loader.Loader.doQuery(Loader.java:724)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
      at org.hibernate.loader.Loader.doList(Loader.java:2228)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
      at org.hibernate.loader.Loader.list(Loader.java:2120)
      at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
      at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
  </code></pre>
  
  <p>I'm wondering whether JVM ARGS <code>-Xms1024m -Xmx2048m</code> is still working?</p>
  
  <p>Since Java 8 has removed Perm Generation: <a href="http://www.infoq.com/articles/Java-PERMGEN-Removed" rel="noreferrer">http://www.infoq.com/articles/Java-PERMGEN-Removed</a>, I think the different GC strategy/memory management between Java 7 and Java 8 may be the root cause. Is there any suggestion?</p>