On 2/21/2018 7:51 AM, Bram Van Dam wrote: > solr.in.sh appears to contain broken GC suggestions: > > # These GC settings have shown to work well for a number of common Solr > workloads > #GC_TUNE="-XX:NewRatio=3 -XX:SurvivorRatio=4 etc.
In 5.x, the default environment variables were specified in solr.in.sh, but now they are all in the bin/solr script itself. On recent versions, you should find everything commented in solr.in.sh, serving only as examples. When run with out-of-the-box config, Solr still ends up using GC tuning that's extremely similar to what 5.x had, unless you override it in the include script. You can see what actually gets used if you visit the admin UI dashboard. The line you mentioned with the "etc." on it is a commented configuration line. Which means it isn't actually active. Note the # symbol as the first character of the line. So this is not a real problem, but we could probably do better, because if the example is uncommented and not changed at all, Solr probably won't even start. Here's an enhancement idea: # The GC tuning can be overridden with the GC_TUNE setting. # Here's one variation that you can uncomment: #GC_TUNE=" \ #-XX:+UseG1GC \ #-XX:+ParallelRefProcEnabled \ #-XX:G1HeapRegionSize=8m \ #-XX:MaxGCPauseMillis=250 \ #-XX:InitiatingHeapOccupancyPercent=75 \ #-XX:+AggressiveOpts \ #" Disclaimer: These options came from settings that I have documented on my personal page in the Solr wiki. I removed a couple of the more controversial options that I'm using from the commented example above. https://wiki.apache.org/solr/ShawnHeisey#GC_Tuning_for_Solr Because of the dire warnings from Lucene, having a G1 config in Solr, even one that's not active by default, might be too controversial to actually implement. Thanks, Shawn