...
Java-based Docker image
Minimal memory requirements
RAM requirements are calculated from two things: java process RAM and containers OS ram usage. This values should be configured separately and container limit should include both values.
JAVA_OPTIONS
-XX:+UseZGC -Xms64m -Xmx64m
Docker Container’s OS
128m
Algorithm for calculation
Module’s memory / 4 and it will be a Xms and Xmx numbers
Xms and Xmx numbers should not be less then 64m and not higher then 256m
Container limit should be settled as Xms value + Container’s overhead value ((Module’s memory / 4) >64m <256m + 128m)
Example
mod-inventory 2048m RAM
Xmx and Xms value = 2048/4 = 512m
512m is higher then 256m, so final value for Xmx and Xms will be 256m
JAVA_OPTIONS should be like
-XX:+UseZGC -Xms256m -Xmx256m
Container limit should be 256m + 128m = 384m
Minimal CPU Requirements
CPU allocation depends on container’s load but not less then 0.2 CPU
Native Docker Image
To be implemenntedimplemented