Documentation Center

Configuring JVM memory settings in the microservice installation scripts

The easiest way to allocate less or more memory than the default for your standalone microservice is by editing the contents of the startup scripts, installService.ps1, start.ps1 or start.sh.

About this task

By default, a standalone microservice applies the following JVM memory settings:
JVM -X optionValue
-Xms (initial and minimum heap size )256m (256 MB)
-Xmx (maximum heap size)512m (512 MB)

Depending on the specific microservice and on how you use it, these amounts may be too little or too much for your liking. If you want to change these values, edit the script you use.

Procedure

  1. If you already have your microservice installed and if you used installService.ps1 to install it, access the installation media and run the uninstallation script, uninstallService.ps1. If you started the microservice using start.ps1 or start.sh instead, simply close the window or kill the process that runs the microservice.
  2. Copy the installation script you intend to use, either start.ps1, start.sh or installService.ps1, from the installation media to a local directory.
  3. Open the script for editing.
  4. Find the line that starts with $jvmoptions = followed by a comma-separated list of JVM options.
  5. Change the values of the -Xms and/or -Xmx options.
  6. Save and close your script.
  7. Follow the normal installation procedure for the standalone microservice script to install this standalone microservice.