JVM memory tuning

There are many settings for JVM performance tuning, which can be referred to as JVM parameters.

The main purpose of tuning:

  1. Control the behavior of GC. GC is a background process, but it also consumes system performance, so GC behavior is often changed according to the characteristics of the program running on the system

  2. Control the size of the JVM stack. Generally speaking, the JVM does not require you to modify memory allocation , (for example), but when your program generates a lot of new generation objects in a certain period of time, you need to control the new generation heap size. .At the same time, it is also necessary to control the total JVM size to avoid memory overflow

  3. Control the memory allocation of JVM threads . If it is a multi-threaded program, the memory consumed by generating threads and thread running can also be controlled. It is necessary to configure the optimal results after a certain period of observation.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325093278&siteId=291194637