Spring boot project memory management

Kenight_ 2022-06-24 08:03:42 阅读数:702

springbootprojectmemorymanagement

Memory related operating parameters

The value is the reference of the lowest configuration

-Xms16m \
-Xmx48m \
-XX:MaxMetaspaceSize=64m \
-XX:CompressedClassSpaceSize=8m \
-Xss256k \
-Xmn8m \
-XX:InitialCodeCacheSize=4m \
-XX:ReservedCodeCacheSize=8m \
-XX:MaxDirectMemorySize=16m

If it is -jar Mode start

java -Xms16m -Xmx64m -jar app.jar

If started as a service

By customizing Spring boot Script and use

JAVA_OPTS=-Xmx16m -Xmx64m
For more details , Reference resources original text
copyright:author[Kenight_],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/175/202206240219095033.html