Is JVM ARGS '-Xms1024m -Xmx2048m' still useful in Java 8?

后端 未结 2 684
傲寒
傲寒 2021-02-03 22:35

I have a Java 7 application using JVM ARGS: -Xms1024m -Xmx2048m, and it runs pretty well.

After I upgrade to Java 8, it runs in error state with Exception:<

2条回答
  •  感动是毒
    2021-02-03 23:02

    What I know is one reason when “GC overhead limit exceeded” error is thrown when 2% of the memory is freed after several GC cycles

    By this error your JVM is signalling that your application is spending too much time in garbage collection. so the little amount GC was able to clean will be quickly filled again thus forcing GC to restart the cleaning process again.

    You should try changing the value of -Xmx and -Xms.

提交回复
热议问题