• [推荐]JVM参数统一管理


    [推荐]JVM参数统一管理

    //根据实际内存计算,使用实际内存的50%, 默认为2g
    
    //$app 应用名
    
    -Xmx{$xmx}g -Xms{$xmx}g
    
    -Xss256k -XX:NewRatio=1 -XX:SurvivorRatio=8 -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=512m -XX:MaxTenuringThreshold=5 -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djdk.tls.ephemeralDHKeySize=2048 -XX:+ExplicitGCInvokesConcurrent -Djava.security.egd=file:/dev/./urandom -Dsun.net.inetaddr.ttl=30 -XX:+PrintGCDetails -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintTenuringDistribution -XX:+PrintPromotionFailure -XX:+PrintGCApplicationStoppedTime -XX:+PrintHeapAtGC -Xloggc:/data/$app/logs/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/$app/logs/ -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:ErrorFile=/data/$app/logs/hs_err_%p.log
    
    示例模板:
    
    -Xmx2g -Xms2g -Xss256k -XX:NewRatio=1 -XX:SurvivorRatio=8 -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=512m -XX:MaxTenuringThreshold=5 -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djdk.tls.ephemeralDHKeySize=2048 -XX:+ExplicitGCInvokesConcurrent -Djava.security.egd=file:/dev/./urandom -Dsun.net.inetaddr.ttl=30 -XX:+PrintGCDetails -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintTenuringDistribution -XX:+PrintPromotionFailure -XX:+PrintGCApplicationStoppedTime -XX:+PrintHeapAtGC -Xloggc:/data/calprovider/logs/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/calprovider/logs/ -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:ErrorFile=/data/calprovider/logs/hs_err_%p.log
  • 相关阅读:
    RDLC报表开发技巧备忘
    C#3.0"扩展方法"简记
    将activity转化成view
    取消logcat输出
    低栏的项目切换
    android edittext 限制文本框输入的长度和提示信息
    android如何调用dotnet编写的webservice
    iphone 式退出
    几种tabhost的总结(1)
    切换浏览示意图
  • 原文地址:https://www.cnblogs.com/mayingbao/p/4305359.html
Copyright © 2020-2023  润新知