Which arguments stand for what in JVM memory options?

前端 未结 4 1512
余生分开走
余生分开走 2020-12-07 18:18

There a lot of JVM arguments that affect the JVM\'s memory usage like -Xms, -Xmx, -Xns, -XX:MaxPermSize...

  • What do they do?
  • Are there any
4条回答
  •  执念已碎
    2020-12-07 18:29

    Read JVM options explained. Here're excerpts from it:

    • If you are frequently recieving java.lang.OutOfMemoryError: Java heap space errors you should increase -Xmx value.
    • Normally -XX:PermSize and -XX:MaxPermSize do not need to be adjusted but if you are seeing java.lang.OutOfMemoryError: PermGen space events often you can increase these values.
    • -XX:MaxJavaStackTraceDepth - This specifies how many entries a stack trace for a thrown error or exception can have before a StackOverflowError is thrown. So if you are dealing with huge stack traces you can use this option to increase the allowed entriers before overflow.

提交回复
热议问题