Labels

Monday, February 4, 2013

Java Heap Size Adjustment

If you observe an OutOfMemoryError in the garbage collection logs, try increasing the Java heap size to 80% of the physical memory you have available for the JVM.   Based on whether the old generation space or the permanent generation space is running out of memory, you adjust the sizes of heap spaces in this way[10]:

  • For old generation space OutOfMemoryErrors
    • increase -Xms and -Xmx
  • For permanent generation OutOfMemoryErrors
    • increase -XX:PermSize and -XX:MaxPermSize

No comments:

Post a Comment