我正在尝试使Solr 6.6与G1GC垃圾收集器一起使用。根据文档,设置GC_TUNE属性就足够了。但它没有帮助。 我已经设置
GC_TUNE="-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+AggressiveOpts"
下一条运行命令并打印出详细输出
$SOLR_INSTALL_DIR/bin/solr start -cloud -z $ZK_HOST -h $SOLR_HOST -m 6g -V
Starting Solr using the following settings:
JAVA = java
SOLR_SERVER_DIR = /opt/solr/server
SOLR_HOME = /opt/solr/server/solr
SOLR_HOST = REDACTED
SOLR_PORT = 8983
STOP_PORT = 7983
JAVA_MEM_OPTS = -Xms6g -Xmx6g
GC_TUNE = -XX:NewRatio=3 -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=8 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 -XX:+CMSScavengeBeforeRemark -XX:PretenureSizeThreshold=64m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=50 -XX:CMSMaxAbortablePrecleanTime=6000 -XX:+CMSParallelRemarkEnabled -XX:+ParallelRefProcEnabled -XX:-OmitStackTraceInFastThrow
GC_LOG_OPTS = -verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -Xloggc:/opt/solr/server/logs/solr_gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=9 -XX:GCLogFileSize=20M
SOLR_TIMEZONE = UTC
CLOUD_MODE_OPTS = -DzkClientTimeout=15000 -DzkHost=REDACTED:2181
SOLR_OPTS = -Xss256k
我不明白为什么GC_TUNE与设置的不同。