Xmx与Xms实践认识

Today,I took an exercise about the -Xms main memory in jvm mechine.
 My english is very poor,fuck.
   Let's set -Xms=64M
                 -Xmx=512M

Then I open jconsole and listenning the pid in process.
then we seethe follow picture.

we see that while the value of main memory which is being aliving will get down when near 70M,and then,
it will grow up,and then down...

Just as book says that -Xms is something that is applied smallest for jvm while  -Xmx is the biggest.
-Xms,which is default as  1/64 of memory of physical hardpan.
and -Xmx,1/4 of memory of physical hardpan.
while the free working memory is less than 40 percent or more than 70 percent,jvm will adjust Heap to -Xmx or -Xms.
The reason that the free working memory will get down is GC.
Just as picture shows above.
So as to be avoid adjusting the size of Heap frequently,we shall set -Xms equals to -Xms

原文地址:https://www.cnblogs.com/xiaoliu66007/p/3007253.html