You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2019/05/02 19:07:28 UTC
[lucene-solr] branch branch_8x updated: SOLR-13394: Tweaking G1
parameters and adding ref guide documentation
This is an automated email from the ASF dual-hosted git repository.
ishan pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new ac2e1e3 SOLR-13394: Tweaking G1 parameters and adding ref guide documentation
ac2e1e3 is described below
commit ac2e1e3cea8eae3a81a1af16eaece81bbb37695b
Author: Ishan Chattopadhyaya <is...@apache.org>
AuthorDate: Fri May 3 00:36:32 2019 +0530
SOLR-13394: Tweaking G1 parameters and adding ref guide documentation
---
solr/bin/solr | 5 ++---
solr/bin/solr.cmd | 5 ++---
solr/solr-ref-guide/src/taking-solr-to-production.adoc | 6 +++++-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/solr/bin/solr b/solr/bin/solr
index 9b435f3..81e98a5 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -2021,10 +2021,9 @@ function start_solr() {
GC_TUNE=('-XX:+UseG1GC' \
'-XX:+PerfDisableSharedMem' \
'-XX:+ParallelRefProcEnabled' \
- '-XX:G1HeapRegionSize=16m' \
'-XX:MaxGCPauseMillis=250' \
- '-XX:InitiatingHeapOccupancyPercent=45' \
- '-XX:+UseLargePages')
+ '-XX:+UseLargePages' \
+ '-XX:+AlwaysPreTouch')
else
GC_TUNE=($GC_TUNE)
fi
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 2679a72..bbe929f 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1170,10 +1170,9 @@ IF "%GC_TUNE%"=="" (
set GC_TUNE=-XX:+UseG1GC ^
-XX:+PerfDisableSharedMem ^
-XX:+ParallelRefProcEnabled ^
- -XX:G1HeapRegionSize=16m ^
-XX:MaxGCPauseMillis=250 ^
- -XX:InitiatingHeapOccupancyPercent=45 ^
- -XX:+UseLargePages
+ -XX:+UseLargePages ^
+ -XX:+AlwaysPreTouch
)
if !JAVA_MAJOR_VERSION! GEQ 9 (
diff --git a/solr/solr-ref-guide/src/taking-solr-to-production.adoc b/solr/solr-ref-guide/src/taking-solr-to-production.adoc
index e4dcd95..41b70d4 100644
--- a/solr/solr-ref-guide/src/taking-solr-to-production.adoc
+++ b/solr/solr-ref-guide/src/taking-solr-to-production.adoc
@@ -186,7 +186,11 @@ By default, the `bin/solr` script sets the maximum Java heap size to 512M (-Xmx5
SOLR_JAVA_MEM="-Xms10g -Xmx10g"
----
-Also, the <<solr-control-script-reference.adoc#solr-control-script-reference,Solr Control Script>> comes with a set of pre-configured Java Garbage Collection settings that have shown to work well with Solr for a number of different workloads. However, these settings may not work well for your specific use of Solr. Consequently, you may need to change the GC settings, which should also be done with the `GC_TUNE` variable in the `/etc/default/solr.in.sh` include file. For more information [...]
+Also, the <<solr-control-script-reference.adoc#solr-control-script-reference,Solr Control Script>> comes with a set of pre-configured Garbage First Garbage Collection settings that have shown to work well with Solr for a number of different workloads.
+However, these settings may not work well for your specific use of Solr. Consequently, you may need to change the GC settings, which should also be done with the `GC_TUNE` variable in the `/etc/default/solr.in.sh` include file. For more information about garbage collection settings refer to folowing articles:
+1. https://wiki.apache.org/solr/ShawnHeisey
+2. https://www.oracle.com/technetwork/articles/java/g1gc-1984535.html
+You can also refer to <<jvm-settings.adoc#jvm-settings,JVM Settings>> for tuning your memory and garbage collection settings.
==== Out-of-Memory Shutdown Hook