Your kernel does not support cgroup swap limit解决办法

问题描述

在run一个docker时,报如下警告信息:

1
2
3
WARNING: Your kernel does not support cgroup swap limit. WARNING: Your
kernel does not support swap limit capabilities. Limitation discarded.
To prevent these messages, enable memory and swap accounting on your system. To enable these on system using GNU GRUB (GNU GRand Unified Bootloader), do the following.

解决办法

修改/etc/default/grub

1
$ sudo vi /etc/default/grub

设置GRUB_CMDLINE_LINUX,如下:

1
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

更新grub

1
2
$ sudo update-grub
$ reboot
坚持原创技术分享,您的支持将鼓励我继续创作!