http://www.importnew.com/13827.html
参数如下:
JAVA_OPTS="-server -Xms1024m -Xmx1024m -Xss256k -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/local/tomcat-api-8090/logs/qumf.dump -Dcom.sun.management.jmxremote.port=9801 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=192.168.10.98"
使用默认的JVM回收器
JAVA_OPTS="-server -Xms1024m -Xmx1024m -Xss256k -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/local/tomcat-api-8090/logs/qumf.dump -Dcom.sun.management.jmxremote.port=9801 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=192.168.10.98"
其实2中GC策略 系统的tps相差不大,但是G1在老年代增长慢一些