Tuning GC settings for Solr
To use the G1 Garbage Collector with the Ambari Infra Solr Instance, follow these steps.
To use the G1 Garbage Collector with the Ambari Infra Solr Instance, follow these steps.
GC_TUNE="-XX:+UseG1GC
-XX:+PerfDisableSharedMem
-XX:+ParallelRefProcEnabled
-XX:G1HeapRegionSize=4m
-XX:MaxGCPauseMillis=250
-XX:InitiatingHeapOccupancyPercent=75
-XX:+UseLargePages
-XX:+AggressiveOpts"
The value used for the -XX:G1HeapRegionSize is based on the 12GB Solr Maximum Heap recommended. If you choose to use a different heap size for the Solr server, please consult the following table for recommendations:
Heap Size | G1HeapRegionSize |
---|---|
< 4GB | 1MB |
4-8GB | 2MB |
8-16GB | 4MB |
16-32GB | 8MB |
32-64GB | 16MB |
>64GB | 32MB |