me-box/databox

Pi Image docker info warnings - No kernel memory limit support

Opened this issue · 2 comments

I'm having trouble with docker not reporting memory usage. Which is making troubleshooting the Pi image tricky. docker info shows:

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

on Raspbian this can be fixed by adding

cgroup_enable=memory cgroup_memory=1 swapaccount=1

to /boot/cmdline.txt. I'm not sure if it is the same on Alpine.

Could someone look into adding this to the Image, please?

I know this is verry old issue, but I am posting in case if someone else encounters it, like I did.
OS: Alpine 3.12 Aarch64.
My installation differs from default diskless install. I used this doc for persistent install.

Since RPI doesn't use traditional bootloaders like Grub or extlinux, the approach of modifying kernel parameters is as follows;

You need to edit file /media/mmcblk0p1/cmdline.txt
And append

cgroup_enable=memory cgroup_memory=1 swapaccount=1

to the end of the only line, so it becomes something like this:

modules=loop,squashfs,sd-mod,usb-storage quiet console=tty1 root=/dev/mmcblk0p2 cgroup_enable=memory cgroup_memory=1 swapaccount=1 

Reboot afterwards and verify with docker info