O suporte ao limite de troca permite limitar a troca que o contêiner usa, consulte link
De acordo com link :
You can enable these capabilities on Ubuntu or Debian by following these instructions. Memory and swap accounting incur an overhead of about 1% of the total available memory and a 10% overall performance degradation, even if Docker is not running.
1) Log into the Ubuntu or Debian host as a user with sudo privileges.
2) Edit the
/etc/default/grub
file. Add or edit theGRUB_CMDLINE_LINUX
line to add the following two key-value pairs:GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
3) Update GRUB.
$ sudo update-grub