Home > front end >  20200103
20200103

Time:02-07

The JVM parameter configuration, garbage collector configuration

(1) the JVM is also in the startup file with

Initial heap size - XMS:

The -xmx: the maximum heap size

- XMN: young generation size

- XX: PermSize: lasting generation size

- XX: MaxPermSize: persistent with maximum

- Xss: each thread stack size



(2) garbage collector configuration

Generally use CMS garbage collector (concurrent garbage collector), reduce user threads in FGC pause time

- XX: + UseconcMarkSweepGC



Generally the JVM configuration

First match heap, first initial heap size and maximum heap size, if the CPU kernel size is 10, generally with 7 to 6 g, second young generation, generally young generation accounts for 3/8 of heap memory, do not need to match the old s, persistent with size less than 512 k, match again thread stack XSS had better not exceed 512 k.

Garbage collector: young substitute parallel garbage collector, set parallel to collect the number of threads (according to the number of particles of CPU to match), set up the CMS garbage collector (concurrent garbage collector), as the chart

  • Related