Microservice memory footprints and heap sizes
The various Content Delivery microservices have default Java heap size settings preconfigured in their startup scripts. The actual maximum heap size needed by your microservices depends on the loads placed on them.
The preconfigured heap size settings for initial and minimum heap size on the one hand, and maximum heap size on the other hand, reflect the minimal expected memory footprint for each microservice, based on measurements made using Apache JMeter on an AWS (Amazon Web Services) instance using 2 CPUs and 8 GB of RAM.
However, if your services need to process large numbers of requests, these recommended heap sizes may not be sufficient. This is especially true for the Content Service, the Session-enabled Content Service and the Preview Service.
You can use Apache JMeter yourself to generate loads of different sizes, together with server monitoring tools, to capture memory and CPU usage over time.
Once you have determined your ideal heap size, you can change the maximum heap size of each microservice by modifying the -Xmx setting of the JVM options in the microservice's installation script on the server.
Under no circumstances should any of these settings have a value under 256.
| 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 |