tomcat - Difference between Xms and Xmx and XX:MaxPermSize -


what difference between

-xms4096m -xmx2048m  -xx:maxpermsize=712m 

i getting confused of 2 -xmx2048m , -xx:maxpermsize=712m

and happen if use -xmx2048m or -xmx2048m

java objects reside in area called heap, while metadata such class objects , method objects reside in permanent generation or perm gen area. permanent generation not part of heap.

the heap created when jvm starts , may increase or decrease in size while application runs. when heap becomes full, garbage collected. during garbage collection objects no longer used cleared, making space new objects.

-xmssize specifies initial heap size.

-xmxsize specifies maximum heap size.

-xx:maxpermsize=size sets maximum permanent generation space size. option deprecated in jdk 8, , superseded -xx:maxmetaspacesize option.

sizes expressed in bytes. append letter k or k indicate kilobytes, m or m indicate megabytes, g or g indicate gigabytes.

references:

how java memory pool divided?

what perm space?

java (jvm) memory model – memory management in java

java 7 se command line options

java 7 hotspot vm options


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -