我正在写一个java api(报告Api),它是从弹性搜索中导出一个巨大的数据,我测试了代码,但我发现Gc活动中有很多峰值我需要建议来调整jvm params和Gc prams < / p>
-verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewRatio=2 -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSClassUnloadingEnabled -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses -XX:+ScavengeBeforeFullGC -XX:+CMSScavengeBeforeRemark -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Dfile.io.encoding=UTF-8 -DjavaEncoding=UTF-8 -Xms2300m -Xmx2300m -XX:MaxMetaspaceSize=512m -XX:MetaspaceSize=256m -Dspring.profiles.active=loadtest -Dhttps.proxyHost=proxy.payfort.com -Dhttps.proxyPort=80 -Dhttp.proxyHost=proxy.payfort. Dorg.jboss.boot.log.file=/opt/jboss/standalone/log/server.log -Dlogging.configuration=file:/opt/jboss/standalone/configuration/logging.properties -jar /opt/jboss/jboss-modules.jar -mp /opt/jboss/modules org.jboss.as.standalone -Djboss.home.dir=/opt/jboss -Djboss.server.base.dir=/opt/jboss/standalone -c standalone.xml