Skip to content

Instantly share code, notes, and snippets.

@pekrockstar
Last active December 8, 2017 13:02
Show Gist options
  • Save pekrockstar/e6d28244e1d540c05144370d6a64ba66 to your computer and use it in GitHub Desktop.
Save pekrockstar/e6d28244e1d540c05144370d6a64ba66 to your computer and use it in GitHub Desktop.
Solr 5.x G1 Garbage Collector
# Enable verbose GC logging
GC_LOG_OPTS=" \
-verbose:gc \
-XX:+PrintHeapAtGC \
-XX:+PrintGCDetails \
-XX:+PrintGCDateStamps \
-XX:+PrintGCTimeStamps \
-XX:+PrintTenuringDistribution \
-XX:+PrintGCApplicationStoppedTime \
-XX:+PrintStringDeduplicationStatistics \
"
# These GC settings have shown to work well for a number of common Solr workloads
# Use G1 Garbage Collector
GC_TUNE=" \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=250 \
-XX:InitiatingHeapOccupancyPercent=40 \
-XX:+AggressiveOpts \
-XX:ConcGCThreads=4 \
-XX:ParallelGCThreads=4 \
-XX:MaxTenuringThreshold=8 \
-XX:PretenureSizeThreshold=64m \
-XX:G1ReservePercent=15 \
-XX:+UseStringDeduplication \
-XX:+PerfDisableSharedMem \
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment