can be used on a recent JDK8 as well. As I understand it, JDK10 just makes container awareness automatic.
✅ 1
📝 1
d
dave08
04/25/2018, 1:23 PM
It might be nice to consider using those settings in the Docs instead of the current ones @Deactivated User? Since I doubt all apps would need 4GB, and there are alot that are running in Docker orchestration infrastructures that can't afford JVM containers hogging all the resources...
d
Deactivated User
04/25/2018, 2:55 PM
Sure. Thanks for noticing!
Deactivated User
04/25/2018, 4:39 PM
Updated documentation and ktor-sample:docker.
It seems that our image includes patch 151 that already has these options, so it should work 👍.
Copy code
docker run -m512M openjdk:8-jre-alpine java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+PrintFlagsFinal -XX:InitialRAMFraction=2 -XX:MinRAMFraction=2 -XX:MaxRAMFraction=2 -version | grep MaxHeapSize
uintx MaxHeapSize := 268435456 {product}
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (IcedTea 3.6.0) (Alpine 8.151.12-r0)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)