I am starting a Java
app as follows
JAVA_OPTS=-Xmx7g -Xms512m -Xss1m -XX:+UseCompressedOops -XX:-OmitStackTraceInFastThrow
The pod I am using for this, has
resources:
limits:
cpu: 4096m
memory: 9Gi
requests:
cpu: 1024m
memory: 512Mi
However, I see once and then, pods being killed with
"Memory cgroup out of memory: Kill process 3284727 (java) score 1982 or sacrifice child
Killed process 3284727 (java) total-vm:15318320kB, anon-rss:9380388kB, file-rss:20180kB, shmem-rss:0kB"
Why does this take place?
How come the memory usage surpasses 9G
given that I set Xmx=7G