me-box / databox

Databox container manager and dashboard server
MIT License
94 stars 25 forks source link

Pi Image docker info warnings - No kernel memory limit support #303

Open Toshbrown opened 5 years ago

Toshbrown commented 5 years ago

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?

Toshbrown commented 5 years ago

this looks helpful https://wiki.alpinelinux.org/wiki/Docker

xZero707 commented 3 years ago

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