zoukankan      html  css  js  c++  java
  • [推荐]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
  • 相关阅读:
    Rock the Tech Interview
    k-d Tree in TripAdvisor
    Randomized QuickSelect
    Kth Smallest Element in Unsorted Array
    Quick Sort
    LRU Cache 解答
    Implement Queue using Stacks 解答
    Implement Stack using Queues 解答
    ListNode Review ReverseListNode
    BackTracking
  • 原文地址:https://www.cnblogs.com/mayingbao/p/4305359.html
Copyright © 2011-2022 走看看