che-server/dockerfiles/init/modules/compose
Sergii Kabashniuk 026598d841
Optimize che-server ram usage on Docker (#7787)
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.
2017-12-08 18:53:27 +02:00
..
manifests single compose file template (#3290) 2016-12-06 16:00:19 +02:00
templates Optimize che-server ram usage on Docker (#7787) 2017-12-08 18:53:27 +02:00