Skip to content

Apache Lucene open-source search software

SOLR-7319: Workaround for the "Four Month Bug" GC pause problem

Shawn Heisey421897ea3c25
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 80610475695..823be933b4d 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -91,6 +91,15 @@ Upgrading from Solr 5.0
contain some LGPL-only code. Until that's resolved by Tika, you can download the
.jar yourself and place it under contrib/extraction/lib.
+* A twitter engineer discovered a JVM bug that causes GC pause problems. The
+ workaround for those problems makes certain functionality impossible, such as
+ running the jstat program on your Solr instance. That workaround has been
+ implemented in the bin/solr start scripts. If you need the missing java
+ functionality, delete the "-XX:+PerfDisableSharedMem" parameter from
+ bin/solr.in.sh or bin/solr.in.cmd.
+
+ http://www.evanjones.ca/jvm-mmap-pause.html
+
Detailed Change List
----------------------
@@ -341,6 +350,12 @@ Bug Fixes
* SOLR-7309: Make bin/solr, bin/post work when Solr installation directory contains spaces
(Ramkumar Aiyengar, Martijn Koster)
+* SOLR-7319: Workaround for the "Four Month Bug" GC pause problem discovered
+ by a twitter software engineer. This causes GC pauses when JVM statistics
+ are left enabled and there is heavy MMAP write activity.
+ http://www.evanjones.ca/jvm-mmap-pause.html
+ (Shawn Heisey)
+
Optimizations
----------------------
diff --git a/solr/bin/solr.in.cmd b/solr/bin/solr.in.cmd
index 905284ebc2b..ff11f62da82 100644
--- a/solr/bin/solr.in.cmd
+++ b/solr/bin/solr.in.cmd
@@ -40,6 +40,7 @@ set GC_TUNE=-XX:NewRatio=3 ^
-XX:+UseCMSInitiatingOccupancyOnly ^
-XX:CMSInitiatingOccupancyFraction=50 ^
-XX:CMSMaxAbortablePrecleanTime=6000 ^
+ -XX:+PerfDisableSharedMem ^
-XX:+CMSParallelRemarkEnabled ^
-XX:+ParallelRefProcEnabled
diff --git a/solr/bin/solr.in.sh b/solr/bin/solr.in.sh
index ccaea12f37e..9d33fca5d00 100644
--- a/solr/bin/solr.in.sh
+++ b/solr/bin/solr.in.sh
@@ -37,6 +37,7 @@ GC_TUNE="-XX:NewRatio=3 \
-XX:PretenureSizeThreshold=64m \
-XX:+UseCMSInitiatingOccupancyOnly \
-XX:CMSInitiatingOccupancyFraction=50 \
+-XX:+PerfDisableSharedMem \
-XX:CMSMaxAbortablePrecleanTime=6000 \
-XX:+CMSParallelRemarkEnabled \
-XX:+ParallelRefProcEnabled"