Optimize che-server ram usage on Docker Proposal is to set container limit to 750M for both Docker and OpenShift and tune a bit GC -XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true -Xms20m Important parts -XX:MaxRAMFraction=2 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap - tels jvm to use ~ CHE_MASTER_CONTAINER_RAM/MaxRAMFraction for heap We need some space for off-heap activity. During test I saw VmRSS of jvm ~330_000k - 350_000k. -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 ask GC to keep heap compact in cost of some CPU. You can see changes in heap usage pattern in images below. |
||
|---|---|---|
| .. | ||
| docs | ||
| manifests | ||
| modules | ||
| s2i | ||
| Dockerfile | ||
| build.sh | ||
| entrypoint.sh | ||