Java 优化要点

java优化四个要素:1、-server服务器方式启动2、-Xms1g -Xmx1g初始大小与最大大小保持一致 -Xss256k线程栈从默认128扩到256  3、-Xmn512m新生代内存:年老代内存保持 1:2到1:1左右 4、回收器选择,暂定cms的回收器UseConcMarkSweepGC

JAVA_OPTS="-server  -Xms1g -Xmx1g -Xmn512m -Xss256k -XX:PermSize=256M -XX:MaxPermSize=512M -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5 -XX:GCTimeRatio=19 -Xnoclassgc -XX:+DisableExplicitGC -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=70 -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -Xloggc:/data/log/applogs/gc.log";

上一篇:caffe提取每一层中的特征,在matlab或python查看


下一篇:BZOJ1001: [BeiJing2006]狼抓兔子 [最小割 | 对偶图+spfa]