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, the various microservices apply the following JVM memory settings:
Service nameInitial and minimum heap size (-Xms setting) in MBMaximum heap size (-Xmx setting) in MB
Content Service5121536
Context Engine Service256512
Contextual Image Delivery256512
Content Deployer256512
Combined Content Deployer5121024
Content Deployer Worker5121024
Discovery Service128256
IQ Combined Index and Query Service256512
IQ Query Service256512
IQ Index Service256512
UGC Community Service256512
UGC Moderation Service256512

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.