Production environment JVM memory size configuration

basic situation

in the production environment, the server memory of 128G java application jvm uses the default configuration. After the application starts, it takes up 1G of memory, which increases to about 2-4G after using it for a period of time

.

question:

what are the rules for the default memory size of jvm? The larger the server memory, the larger the jvm default memory. What are the specific rules?
how much memory is used by java applications in your production environment?
considering that the jvm memory is too large, affecting the GC pause time and other factors, how to determine whether the memory size is appropriate?

this, salute

Sep.21,2021

for Java8, the initial recognition capacity of heap memory is 1x64 of the actual memory size of the machine, and the maximum memory does not exceed the actual memory of the machine. For details, see ides/vm/gc-ergonomics.html" rel=" nofollow noreferrer "> https://docs.oracle.com/javas.

our production environment generally has a maximum memory limit of 4 gigabytes. Depending on the specific business, Internet companies with large traffic will consider a distributed environment if they occupy more than 16 gigabytes of memory on a single machine.

For

parameter settings, please refer to Jiangnan Bai Yi article

.
Menu