Can someone please explain how the swap works inside containers? I would have thought that since the system resources are shared, shouldn’t the swap also be shared? Inside the container (ZFS based) using htop it says that swap isn’t being used even when the host has 32GB allocated.
The host has 64GB of RAM and 32GB of swap. I have 2 containers. One container is using 20GB of RAM and another 5. If one container used a lot of RAM, would the host automatically start swapping the containers processes, or would the processes inside the container die due to lack of RAM, or would the whole container die?