Configuring JVM memory settings for a microservice
Allocate less or more memory than the default for your microservice by editing its application.properties file,
About this task
By default, the various microservices apply the following JVM memory settings:
| Service name | Initial and minimum heap size in megabytes | Maximum heap size in megabytes |
|---|---|---|
| Content Service | 512 | 1536 |
| Context Engine Service | 256 | 512 |
| Contextual Image Delivery | 256 | 512 |
| Content Deployer | 512 | 1024 |
| Discovery Service | 128 | 256 |
| Experience Optimization Management Service | 512 | 1024 |
| Experience Optimization Query Service | 512 | 1024 |
| IQ Combined Service | 256 | 512 |
| Preview Service | 256 | 384 |
| Session-enabled Content Service | 512 | 1536 |
Depending on the specific microservice and on how you use it, these amounts may be too little or too much for your liking. The steps below explain how to change them.
Procedure
- In the configuration location of your microservice, open the file application.properties for editing.
- To change the initial and minimum heap size, set the value of the
install.minHeapproperty to your desired number of megabytes, followed by a lowercase "m". - To change the maximum heap size, set the value of the
install.maxHeapproperty to your desired number of megabytes, followed by a lowercase "m". - Restart the microservice.