There is docker container with java application inside.
docker inspect dbc237493367 | grep -P '((Memory)|(Pid))'
"Pid": 16283,
"PidMode": "",
"Memory": 10737418240,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": -1,
"MemorySwappiness": -1,
"PidsLimit": 0,
ps auxw | grep 16283
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xms9000m -Xmx9000m -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=512m ...
cat /proc/16283/status | grep -i vm
VmPeak: 20807456 kB
VmSize: 19735624 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 6967836 kB
VmRSS: 3356220 kB
VmData: 19661552 kB
VmStk: 140 kB
VmExe: 4 kB
VmLib: 17964 kB
VmPTE: 24956 kB
VmPMD: 92 kB
VmSwap: 6283192 kB
docker --version
Docker version 1.12.2, build bb80604
So:
1) docker container max memory set to 10gb
2) java application max memory set to 9gb
3) VmSwap value is 6gb ...
Question:
how can that be possible? Why swap memory is used?