Enable Memory Swappiness - Linux

Edit GRUB to enable Memory Swappiness for use with Docker

Edit GRUB to enable Memory Swappiness

Open Default GRUB Config

sudo nano /etc/defaults/grub

Add Command Line options to Default:

  • cgroup_enable=memory

  • swapaccount=1

Example:

/etc/defaults/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory swapaccount=1"

Reload GRUB Config

sudo update-grub

Reboot

sudo systemctl reboot now

Last updated