Memory and Java settings for Jetty

Memory and Java settings for Jetty

Recommended Memory Settings

The 5.4 version relies heavily on in memory caching to improve overall performance.  The minimum recommended allocated memory for a production 5.4 installation in 4GB.  Depending on the size of your Content Repository, allocating additional memory if it is available to the system running percussion may be beneficial.  Do not forget to leave memory free for the Operating System and other processes that may be running on the server running Percussion. 

Changing Memory Settings

The default memory and java settings for the Jetty instance are stored in: <InstallDir>/jetty/defaults/start.d/jvm.ini

In an upgraded server, these memory settings will be migrated from the 5.3 PercussionServer.lax file on Windows, and the PercussionServer.bin.lax file on Linux.  We recommend that you review the migrated settings and adjust them to at least the minimum after the upgrade installer completes. The upgrade will also copy the <InstallDir>/jetty/defaults/start.d/jvm.ini  to <InstallDir>/jetty/base/start.d/jvm.ini  as part of the upgrade process.

To change the memory settings edit the: <InstallDir>/jetty/base/start.d/jvm.ini 

The  # character indicates a comment in this file.  Every Java option should be on it's own line with no extra lines between them.  The -Xmx4096m sets the maximum amount of memory available to the server.   Any standard Java options may be added to this file.  After changing the <InstallDir>/jetty/base/start.d/jvm.ini file, a restart of the service is required. 

 

Default Jetty Java options

# ---------------------------------------

# Module: jvm

# A noop module that creates an ini template useful for

# setting JVM arguments (eg -Xmx )

# ---------------------------------------

--module=jvm

 

## JVM Configuration

## If JVM args are include in an ini file then --exec is needed

## to start a new JVM from start.jar with the extra args.

##

## If you wish to avoid an extra JVM running, place JVM args

## on the normal command line and do not use --exec

--exec

-XX:+DisableAttachMechanism

-server

-Xms512m

-Xmx4096m

-XX:+HeapDumpOnOutOfMemoryError

-noverify

-XX:+UseStringDeduplication

-Dorg.eclipse.jetty.annotations.AnnotationParser.LEVEL=OFF

-Dfile.encoding=UTF8

-Dsun.jnu.encoding=UTF8

-Dhttps.protocols=TLSv1.2

-Djava.net.preferIPv4Stack=true

-Djava.net.preferIPv4Addresses=true

-Drxdeploydir=/Users/myuser/mytest

-Djetty_perc_defaults=/Users/myuser/mytest/jetty/defaults



Leave a comment

*
*