I have some questions (questions in bold):
1.memory-swap and memory-swappiness
In “PREVENT A CONTAINER FROM USING SWAP” it says:
If --memory and --memory-swap are set to the same value, this prevents containers from using any swap.
But wouldn’t that be the same if I set memory-swappiness to 0?
It was not 100% clear for me from this part of documention.
2. docker-compose v3
In the above link it says:
cpu_shares, cpu_quota, cpuset, mem_limit, memswap_limit: These have been replaced by the resources key under deploy. deploy configuration only takes effect when using docker stack deploy, and is ignored by docker-compose.
Is there any way to use mem_limit, memswap_limit in docker-compose (no docker stack deploy) with file version 3? Or workarounds other ways to set swapping to 0?