大网数据广告活动
服务器运维问答

Cannot enable cgroup_enable=memory swapaccount=1 on GCE Debian Jessie instance

· 52CE 我爱测

In order to support Docker memory limits / quotas I'd like to enable the cgroup_enable=memory swapaccount=1 Linux kernel command line options on my Debian Jessie Google Cloud Compute Engine instances. After adding them to /etc/de…

问题原文

原帖链接 · Thilo-Alexander Ginkel · CC BY-SA 3.0

In order to support Docker memory limits / quotas I'd like to enable the

cgroup_enable=memory swapaccount=1

Linux kernel command line options on my Debian Jessie Google Cloud Compute Engine instances. After adding them to /etc/default/grub, updating and rebooting I can see the options being active in /proc/cmdline:

BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 root=UUID=aeb374a4-1a04-4ed7-adac-d5c57b350575 ro console=ttyS0,38400n8 elevator=noop cgroup_enable=memory swapaccount=1

However, docker info still complains about them being disabled:

$ docker info
[...]
WARNING: No kernel memory limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
[...]

Any ideas? Has the kernel included with the GCE Debian image built without support for these features?

社区高分解答

原帖链接 · Tombart · CC BY-SA 3.0

Update /etc/default/grub and set:

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

run update-grub && reboot

Instead of docker info (which seems to be buggy) use rather lxc-checkconfig or check-config.sh from Docker (moby) repository:

wget https://raw.githubusercontent.com/moby/moby/master/contrib/check-config.sh && bash check-config.sh

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。