mirror of https://github.com/apache/lucene.git
74 lines
3.0 KiB
Bash
74 lines
3.0 KiB
Bash
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership.
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
# (the "License"); you may not use this file except in compliance with
|
|
# the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# By default the script will use JAVA_HOME to determine which java
|
|
# to use, but you can set a specific path for Solr to use without
|
|
# affecting other Java applications on your server/workstation.
|
|
#SOLR_JAVA_HOME=""
|
|
|
|
# Increase Java Min/Max Heap as needed to support your indexing / query needs
|
|
SOLR_JAVA_MEM="-Xms512m -Xmx512m -XX:MaxPermSize=256m -XX:PermSize=256m"
|
|
|
|
# Enable verbose GC logging
|
|
GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \
|
|
-XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution"
|
|
|
|
# These GC settings have shown to work well for a number of common Solr workloads
|
|
GC_TUNE="-XX:-UseSuperWord \
|
|
-XX:NewRatio=3 \
|
|
-XX:SurvivorRatio=4 \
|
|
-XX:TargetSurvivorRatio=90 \
|
|
-XX:MaxTenuringThreshold=8 \
|
|
-XX:+UseConcMarkSweepGC \
|
|
-XX:+CMSScavengeBeforeRemark \
|
|
-XX:PretenureSizeThreshold=64m \
|
|
-XX:CMSFullGCsBeforeCompaction=1 \
|
|
-XX:+UseCMSInitiatingOccupancyOnly \
|
|
-XX:CMSInitiatingOccupancyFraction=70 \
|
|
-XX:CMSTriggerPermRatio=80 \
|
|
-XX:CMSMaxAbortablePrecleanTime=6000 \
|
|
-XX:+CMSParallelRemarkEnabled \
|
|
-XX:+ParallelRefProcEnabled \
|
|
-XX:+AggressiveOpts"
|
|
|
|
# Mac OSX and Cygwin don't seem to like the UseLargePages flag
|
|
thisOs=`uname -s`
|
|
# for now, we don't support running this script from cygwin due to problems
|
|
# like not having lsof, ps waux, curl, and awkward directory handling
|
|
if [[ "$thisOs" != "Darwin" && "${thisOs:0:6}" != "CYGWIN" ]]; then
|
|
# UseLargePages flag causes JVM crash on Mac OSX
|
|
GC_TUNE="$GC_TUNE -XX:+UseLargePages"
|
|
fi
|
|
|
|
# Set the ZooKeeper connection string if using an external ZooKeeper ensemble
|
|
# e.g. host1:2181,host2:2181/chroot
|
|
# Leave empty if not using SolrCloud
|
|
#ZK_HOST=""
|
|
|
|
# Set the ZooKeeper client timeout (for SolrCloud mode)
|
|
#ZK_CLIENT_TIMEOUT="15000"
|
|
|
|
# By default the start script uses "localhost"; override the hostname here
|
|
# for production SolrCloud environments to control the hostname exposed to cluster state
|
|
#SOLR_HOST="192.168.1.1"
|
|
|
|
# By default the start script uses UTC; override the timezone if needed
|
|
#SOLR_TIMEZONE="UTC"
|
|
|
|
# By default the start script enables some RMI related parameters to allow attaching
|
|
# JMX savvy tools like VisualVM remotely, set to "false" to disable that behavior
|
|
# (recommended in production environments)
|
|
ENABLE_REMOTE_JMX_OPTS="true"
|