Thursday 3 March 2016

Set Java MaxPermSize and Min Heap Size

MaxPermSize

The MaxPermSize is the maximum size for the permanent generation heap, a heap that holds the byte code of classes and is kept separated from the object heap containing the actual instances.

Min Heap Size

Min Heap Size (-Xms) is a costly operation. Especially in case of financial applications this could mean delays. With similar real-time requirements, it could be a good idea to set -Xms and -Xmx to the same value.

Example for setting MaxPermSize and MinPermSize in Linux.

Go to bin dir,
cd /opt/apache-tomcat-7.0.61/bin
add a new file with
vi setenv.bat
set JAVA_OPTS=-Dfile.encoding=UTF-8 -Xms512m -Xmx4096m -XX:PermSize=128m -XX:MaxPermSize=512m

Ref: http://stackoverflow.com/questions/6902135/side-effect-for-increasing-maxpermsize-and-max-heap-size

No comments:

Post a Comment