First look at the general situation of the JVM, including: heap memory usage, loading classes, number of threads, and so on. As shown in the following illustration:
Then look at the memory usage of the JVM as seen through Jconsole. The JVM mainly manages two types of memory: the heap and the non heap. Simply put, the heap is the memory that Java code can have, is left to the developer; The heap is what the JVM left for itself, all the method areas, internal processes or optimizations needed for the JVM (such as JIT-compiled code caching), each class structure (such as running a constant pool, field, and method data) And the code for methods and construction methods are in non heap memory. In Jconsole, we see the memory condition of the various parts of the green histogram shown below. The JVM's heap memory in Jconsole is divided into: Eden Space memory pool, survivor space memory pool, tenured gen memory pool, non heap memory is divided into: Code cache memory Pool, perm gen memory pool. As shown in the following illustration:
Finally look at the JVM's parameter settings using Jconsole, as shown in the following figure:
The parameters of the JVM above are described below:
-XMS Minimum heap Space
-xmx Maximum heap space
-xmn Cenozoic Space
-XSS Line Stacks Space
-xx:permsize=xxx Permanent Generation Space
-xx:maxpermsize=xxx Maximum permanent generation space