JVM parameter settings to reduce the occurrence of Full GC

Normally, if the configuration is the above situation, that is: 3G of memory is allocated to the heap, old: new=2:1, eden is 8/10 of new, and s0 and s1 are each 1/10. If the storage is stored each time If the data is 60M, the eden area will be full after 14 seconds. At this time, the minor gc case will be in the eden area. The data of 14 seconds will be put into s0, because the 60M data exceeds half of the s0 memory, and it will be directly Put 60M data in the old area, so the old area will be full after 5 or 6 minutes, and Full GC will be performed at this time, so you can set the old generation memory through the following -Xmn setting, thereby increasing the new generation memory and reducing The data is put into the Old area to reduce the Full GC.

 

Guess you like

Origin blog.csdn.net/u014748504/article/details/108279394