原创

Java-启动参数-内存-垃圾回收-oraclejdk-openjdk

oraclejdk
-Djava.net.preferIPv4Stack=true -Xms1524m -Xmx2548m -XX:MaxDirectMemorySize=3072m -XX:PermSize=256m -XX:MaxNewSize=1200m -XX:MaxPermSize=1200m -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./
换行版本:
-Djava.net.preferIPv4Stack=true -Xms1524m -Xmx2548m -XX:PermSize=256m \
-XX:MaxNewSize=1200m -XX:MaxPermSize=1200m -XX:ParallelGCThreads=4 \
-XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails \
-XX:+PrintGCDateStamps -XX:+DisableExplicitGC \
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./ \

openjdk:
-Djava.net.preferIPv4Stack=true -Xms1524m -Xmx2548m -XX:MaxDirectMemorySize=3072m -XX:MetaspaceSize=256m -XX:MaxNewSize=1200m -XX:MaxMetaspaceSize=1200m -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./
换行版本:
-Djava.net.preferIPv4Stack=true -Xms1524m -Xmx2548m \
-XX:MaxDirectMemorySize=3072m -XX:PermSize=256m -XX:MaxNewSize=1200m \
-XX:MaxPermSize=1200m -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC \
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+DisableExplicitGC \
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./ \

直接内存大小:
MaxDirectMemorySize
正文到此结束
本文目录