jvm设置
http://www.360doc.com/content/12/1023/16/9615799_243296263.shtml
堆设置
-Xms :初始堆大小
-Xmx :最大堆大小
-XX:NewSize=n :设置年轻代大小
-XX:NewRatio=n: 设置年轻代和年老代的比值。如:为3,表示年轻代与年老代比值为1:3,年轻代占整个年轻代年老代和的1/4
-XX:SurvivorRatio=n :年轻代中Eden区与两个Survivor区的比值。注意Survivor区有两个。如:3,表示Eden:Survivor=3:2,一个Survivor区占整个年轻代的1/5
-XX:MaxPermSize=n :设置持久代大小
收集器设置
-XX:+UseSerialGC :设置串行收集器
-XX:+UseParallelGC :设置并行收集器
-XX:+UseParalledlOldGC :设置并行年老代收集器
-XX:+UseConcMarkSweepGC :设置并发收集器
垃圾回收统计信息
-XX:+PrintHeapAtGC GC的heap详情
-XX:+PrintGCDetails GC详情
-XX:+PrintGCTimeStamps 打印GC时间信息
-XX:+PrintTenuringDistribution 打印年龄信息等
-XX:+HandlePromotionFailure 老年代分配担保(true or false)
并行收集器设置
-XX:ParallelGCThreads=n :设置并行收集器收集时使用的CPU数。并行收集线程数。
-XX:MaxGCPauseMillis=n :设置并行收集最大暂停时间
-XX:GCTimeRatio=n :设置垃圾回收时间占程序运行时间的百分比。公式为1/(1+n)
并发收集器设置
-XX:+CMSIncrementalMode :设置为增量模式。适用于单CPU情况。
-XX:ParallelGCThreads=n :设置并发收集器年轻代收集方式为并行收集时,使用的CPU数。并行收集线程数
flink设置jvm参数
https://ci.apache.org/projects/flink/flink-docs-release-1.3/setup/config.html
./flink-1.2.0/bin/flink run -m yarn-cluster -yn 4 -yjm 2048 -ytm 8086 -c beam.count.OpsCount -yqu data-default \
-yD taskmanager.heap.mb=4096 -yD yarn.heap-cutoff-ratio=0.6 -yD taskmanager.debug.memory.startLogThread=true -yD taskmanager.debug.memory.logIntervalMs=600000 \
-yz toratest -yst -yd ./beampoc-bundled-0.0.1-SNAPSHOT.jar --parallelism=4
https://mingminxu.com/2017/01/16/run-flink-jobs-on-yarn/
增加flink的jvm参数
-yD env.java.opts="-XX:NewRatio=2"
默认flink 4container slot4 的jmap输出
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 2359296000 (2250.0MB)
NewSize = 786432000 (750.0MB)
MaxNewSize = 786432000 (750.0MB)
OldSize = 1572864000 (1500.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 476053504 (454.0MB)
used = 224818576 (214.40370178222656MB)
free = 251234928 (239.59629821777344MB)
47.225484974058716% used
From Space:
capacity = 101187584 (96.5MB)
used = 85147536 (81.20301818847656MB)
free = 16040048 (15.296981811523438MB)
84.14820537665965% used
To Space:
capacity = 155189248 (148.0MB)
used = 0 (0.0MB)
free = 155189248 (148.0MB)
0.0% used
PS Old Generation
capacity = 1572864000 (1500.0MB)
used = 922110224 (879.3928375244141MB)
free = 650753776 (620.6071624755859MB)
58.62618916829427% used
22206 interned Strings occupying 2255248 bytes.
0人点赞
作者:zachary_1db5
链接:https://www.jianshu.com/p/6f2f53358b9c
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
来源:CSDN
作者:LzwGlory
链接:https://blog.csdn.net/a137268431/article/details/104821661