This can be simplified a great deal.
Lets say you have the following ...
/opt/solr5 = ${solr.install.dir}
/index/solr5/data = ${solr.solr.home}
/index/solr5 = ${jetty.base}
If you create a /index/solr5/start.ini with the following contents ...
--(snip)--
# Jetty HTTP Module
--module=http
jetty.port=8982
# Jetty JMX Module
--module=jmx
# Jetty shutdown setup
STOP.PORT=7982
STOP.KEY=solrrocks
--exec
# JVM Arguments
-Duser.timezone=UTC
# Log4j Settings
-Dlog4j.configuration=file:${jetty.base}/log4j.properties
# jvm memory settings
-Xms18g
-Xmx18g
# GC settings
-verbose:gc
-Xloggc:${jetty.base}/logs/solr_gc.log
-XX:NewRatio=3
-XX:SurvivorRatio=4
-XX:TargetSurvivorRatio=90
-XX:MaxTenuringThreshold=8
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
-XX:+CMSScavengeBeforeRemark
-XX:PretenureSizeThreshold=64m
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=70
-XX:CMSMaxAbortablePrecleanTime=2000
-XX:+CMSParallelRemarkEnabled
-XX:+ParallelRefProcEnabled
-XX:+PrintHeapAtGC
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationStoppedTime
# OOM Setup
-XX:OnOutOfMemoryError=${solr.install.dir}/bin/oom_solr.sh
# JMX Configuration
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=18982
-Dcom.sun.management.jmxremote.rmi.port=18982
--(/snip)--
Your command line to execute jetty is now ...
/usr/lib/jvm/java-8-oracle/bin/java -server \
-Djetty.home=/opt/solr5/server \
-Djetty.base=/index/solr5 \
-Dsolr.solr.home=/index/solr5/data \
-Dsolr.install.dir=/opt/solr5 \
-jar start.jar
And there can even be more optimizations with regards to your log4j
configuration.
Joakim Erdfelt / [email protected]
On Tue, Mar 22, 2016 at 3:11 PM, Shawn Heisey <[email protected]> wrote:
> On 3/22/2016 8:22 AM, Joakim Erdfelt wrote:
> > What system properties are you using?
> > And why not use --exec if you are using System properties?
>
> On a machine running Solr that I started with our init script,
> this is the whole commandline:
>
> /usr/lib/jvm/java-8-oracle/bin/java -server -Xms18g -Xmx18g
> -XX:NewRatio=3 -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=90
> -XX:MaxTenuringThreshold=8 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
> -XX:+CMSScavengeBeforeRemark -XX:PretenureSizeThreshold=64m
> -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70
> -XX:CMSMaxAbortablePrecleanTime=2000 -XX:+CMSParallelRemarkEnabled
> -XX:+ParallelRefProcEnabled -verbose:gc -XX:+PrintHeapAtGC
> -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps
> -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime
> -Xloggc:/index/solr5/logs/solr_gc.log -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.local.only=false
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.port=18982
> -Dcom.sun.management.jmxremote.rmi.port=18982 -Djetty.port=8982
> -DSTOP.PORT=7982 -DSTOP.KEY=solrrocks -Duser.timezone=UTC
> -Djetty.home=/opt/solr5/server -Dsolr.solr.home=/index/solr5/data
> -Dsolr.install.dir=/opt/solr5
> -Dlog4j.configuration=file:/index/solr5/log4j.properties -jar start.jar
> -XX:OnOutOfMemoryError=/opt/solr5/bin/oom_solr.sh 8982 /index/solr5/logs
> --module=http
>
> This is running Jetty 9.2.13.
>
> We are aware that the placement of the OnOutOfMemoryError option is
> incorrect, this will be fixed in our next version.
>
> I finally did manage to locate a webpage that mentions the "--exec"
> option. It says "Starts a forked instance of Jetty." I have some clue
> what all the words mean, but not what the effective result of that
> option is. My best guess is that it starts Jetty in the background.
> This is good for our normal start mode, but we also have a foreground
> option.
>
> I wasn't involved with writing the start script. It looks like we are
> starting Jetty in the background using the "nohup" command. I don't
> know if this is just because it's a convenient option, or because
> immunity to HUP signals was actually desired. In the Windows start
> script, background operation is accomplished with "START /B".
>
> Thanks,
> Shawn
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users