For Alfresco Services Hosted in Docker Container - Use -Xmx vs - XX:MaxRAMPercentage ?

cancel
Showing results for 
Search instead for 
Did you mean: 
finlaysons
Member II

For Alfresco Services Hosted in Docker Container - Use -Xmx vs - XX:MaxRAMPercentage ?

Hello, 

We recently had a Hyland Coaching session. We utilize Docker Containers and Docker Compose with Swarm. 

I went through every step file and every environment. Created the the JVM Allocation Notes documentation (See Attached Documentation) 

The Hyland Documentation (https://docs.alfresco.com/content-services/7.2/config/repository/#tune-the-jvm) is suggesting that we utilize Use -Xmx to specify the explicit maximum heap size rather than what we are currently using - XX:MaxRAMPercentage in order to be dynamic and specify a percentage of ram of the container rather than a hard coded Ram if we allocate more somemory to the container. XX:MaxRAMPercentage seems to be  the standard for JVM in containers.

Notes on parameters suggested

Use -Xmx to specify the maximum heap size
Use -Xms to specify the initial Java heap size
Use -Xss to set the Java thread stack size

Suggested by Hyland
- For 50 concurrent or up to 500 casual users 2.0 GB JVM RAM 2x server CPU (or 1xDual-core)
- For 100 concurrent users or up to 1000 casual users 4.0 GB JVM RAM 4x server CPU (or 2xDual-core)
- For 200 concurrent users or up to 2000 casual users 8.0 GB JVM RAM 8x server CPU (or 4xDual-core)

Notes on parameter we are using :

- XX:MinRAMPercentage - The MinRAMPercentage parameter, unlike its name, allows setting the maximum heap size for a JVM running with a small amount of memory (less than 200MB).
- XX: InitialRAMPercentage: This parameter sets the initial heap size as a percentage of the total memory of a physical server or container. For instance, if you set -XX:InitialRAMPercentage=50.0 on a 1 GB server, the initial heap size will be around 500 MB (50% of 1 GB).
- XX:MaxRAMPercentage - Similar to MinRAMPercentage, this parameter also affects the maximum heap size. It allows specifying the percentage of available RAM for heap allocation, making it useful in containerized environments

Question(s):

- Although we are not setting -Xms1G or -Xmx2G for most of the ram sizes we are using - XX:MinRAMPercentage and XX:MaxRAMPercentage which allows us to adjust for the overall container's memory. It is suggested to use a percentage. Has anyone noticed that there is a issue with using XX:MinRAMPercentage with containers as opposed to --Xmx2G etc ?

Best,

Sean