Set Java startup options¶
The Apache Tomcat application server is optimized for a high number of operations, each with a low amount of data exchanged. This default configuration is not optimal for GeoServer which works with much larger GeoSpatial data.
Follow these steps to set up your Java configuration in a much more efficient way than the one provided by the default startup parameters.
Java options:
Java Option |
Description |
|---|---|
|
Configure memory use to encourage sharing of coordinate reference systems between requests. |
|
Improve performance by disabling external performance monitoring |
System properties:
Parameters |
Description |
|---|---|
|
Default to interpreting coordinate reference systems in easting/northing order for greater compatibility with web clients |
|
When rendering be sure to account for scale when selecting the correct rules to draw |
Windows¶
Apache Tomcat Java Options:
Open the Tomcat configuration tool. If you are running Windows, you will find it at .
Click Configure and select the Java tab.
At the bottom of the Java Options field, enter the following lines:
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0 -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 9.0 -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\logging.properties -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UsePerfData -Dorg.geotools.referencing.forceXY=true
Note -X java options are listed before -D system properties.
If your application server is currently running, stop it and restart it.
Linux and macOS¶
Linux and macOS setenv.sh:
Java options are managed in
setenv.sh:#!/bin/sh # Prepend JVM Options CATALINA_OPTS="-XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UsePerfData ${CATALINA_OPTS}" # Append system properties CATALINA_OPTS="${CATALINA_OPTS} -Dorg.geotools.referencing.forceXY=true"
Notes:
Note -X java options are listed before -D system properties.
Use of CATALINA_OPTS recommended (as used by Tomcat start and run command)