Linode kernel with memory cgroup
I want Docker to be able to gather memory metrics, per the docs:
I need to add "cgroup_enable=memory swapaccount=1" options. But it seems that to be able to add those options I need to use a custom kernel?
Is there another Linode kernel which has these options enabled? Can I achieve this without using a custom kernel?
6 Replies
- Les
FWIW, custom kernels really aren't bad once you get some tooling built for managing it. Though I may be biased because I wrote tooling already and have forgotten it
shamelessplug
- Les
If swapping in a custom kernel, I'd preferably also add aufs support for docker (devicemapper has been proving to be a pain in the ass).
honi: I don't really have a kernel-specific blog post, but really all you need for custom kernels are a vmlinuz kernel file and a /boot/grub/menu.lst. You don't even need the grub package installed, since when you set your Config Profile to use pv-grub, pv-grub just reads the menu.lst itself. I template my menu.lst with some ruby ERB templates (
timeout 25
default 0
title latest
root (hd0)
kernel /latest/kernel rootfspath=/latest/vm_root
initrd /latest/initrd
A regular menu.lst for non-crazy userspace would be a bit different, something like:
timeout 25
default 0
title latest
root (hd0)
kernel /boot/vmlinuz root=/dev/xvda
I'd highly recommend using overlayfs rather than aufs or devicemapper for your Docker storage backend. In my experience, AUFS manifests some weird bugs over time, and overlayfs has the benefit of being in the mainline kernel.
- Les