zoukankan      html  css  js  c++  java
  • java GC optimization, G1GC

    引用    http://www.avricot.com/blog/?post/2010/05/03/Get-started-with-java-JVM-memory-(heap%2C-stack%2C-xss-xms-xmx-xmn...)

      -Xmx : max heap size (ex: -Xmx4g)

      -Xms : min heap size. (ex: -Xms2g) 

      -Xmn : the size of the heap for the young generation
          Young generation represents all the objects which have a short life of time. Young generation objects are in a specific location into the heap, where the garbage collector will pass often.

          All new objects are created into the young generation region (called "eden").

          When an object survive is still "alive" after more than 2-3 gc cleaning, then it will be swap has an "old generation" : they are "survivor" .
          Good size is 33%

    优化之前

      JAVA_OPTS="-Xmn3g -Xms4g -Xmx4g -XX:PermSize=512m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"

    优化之后

      JAVA_OPTS="             -Xms4g -Xmx4g -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+ParallelRefProcEnabled -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"

  • 相关阅读:
    路由策略
    ospf 路由汇总
    OSPF type1 2
    ospf
    TCP 六种标识位
    raid 10 与 01
    SNMP协议
    ffmpeg剪切视频
    ubuntu18安装sbt
    服务器Ubuntu18重启后宝塔访问不了
  • 原文地址:https://www.cnblogs.com/lpthread/p/3410081.html
Copyright © 2011-2022 走看看