Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVM内存分区 #28

Open
diaosichengxuyuan opened this issue Feb 23, 2019 · 0 comments
Open

JVM内存分区 #28

diaosichengxuyuan opened this issue Feb 23, 2019 · 0 comments

Comments

@diaosichengxuyuan
Copy link
Owner

diaosichengxuyuan commented Feb 23, 2019

image

JVM参数

JVM堆最小值:-XX:InitialHeapSize(-Xms)
JVM堆最大值:-XX:MaxHeapSize(-Xmx)
永生代大小:-XX:MetaspaceSize=256m
永生代最大大小:-XX:MaxMetaspaceSize=512m
直接内存大小:-XX:MaxDirectMemorySize=1g
年轻代初始大小:-XX:NewSize=100m(-Xmn)
年轻代最大大小:-XX:MaxNewSize=100m
新生代与老年代比值:-XX:NewRatio=6 年轻代:老年代=1:6
Eden与Survivor比值:-XX:SurvivorRatio=8 Survivor:Eden=1:8
CMS收集器对内存碎片进行压缩整理:-XX:+UseCMSCompactAtFullCollection
启用G1收集器:-XX:+UseG1GC
启用GMS收集器:-XX:+UseConcMarkSweepGC
Parallel收集器线程数:-XX:ParallelGCThreads=4
OOM时dump堆栈:-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath
直接内存最大值:-XX:MaxDirectMemerySize

作者原创,转载请注明出处,违法必究!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant