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:
java (jvm) memory model – memory management in java
Comments
Post a Comment