The last days I have seen some behaviour which crashes some assumption of me. Maybe someone can give me an explanation of the following
The facts
openjdk:8u171-jre-slim-stretch-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap => so resource limits should be obtained from the container and not from the hosts => IMO that worksXX:MaxRAMFraction=2 so we get about the half of the containers memory limit for the heap => IMO that works-Xmx setting for the JVMThe thing I do not get
When GC kicks in (Scavenge or G1) there is an increase in container memory usage, but not in the jvm memory usage. Why does the GC consume memory from the container? OK, it copies stuff eg from old gen to young gen so I understand that for a short time more memory is used. But I have expected that this would be taken from the JVM process and not from some kernel process.