Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu May 07, 2015 11:12 am 
Offline
Newbie

Joined: Thu May 07, 2015 11:08 am
Posts: 3
I'm running Docker in a Linode with Ubuntu 14.04 LTS with 4.0.1-x86_64-linode55 kernel.

I want Docker to be able to gather memory metrics, per the docs:
https://docs.docker.com/installation/ub ... accounting

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?


Top
   
PostPosted: Thu May 07, 2015 11:22 am 
Offline
Senior Member

Joined: Mon Jul 05, 2010 5:13 pm
Posts: 392
The downside here is that memory/swap cgroups involve a perf hit, even for people who aren't actually doing anything with them. Historically, Linode has maintained a single kernel line, so enabling an option in their kernel that will affect perf for every Linode user running the default kernel (which I suspect is a lot of them) is a choice that can't be made lightly.

- Les


Top
   
PostPosted: Thu May 07, 2015 11:35 am 
Offline
Newbie

Joined: Thu May 07, 2015 11:08 am
Posts: 3
I understand. So the only option is to use a custom kernel then?


Top
   
PostPosted: Thu May 07, 2015 11:38 am 
Offline
Senior Member

Joined: Mon Jul 05, 2010 5:13 pm
Posts: 392
Unless Linode enables the option (possible) or starts maintaining multiple kernel "tracks", with the option enabled in one of them (also possible, but probably less likely).

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 :P

#shamelessplug
https://github.com/akerl/roller
https://github.com/dock0/kernel

- Les


Top
   
PostPosted: Sat May 09, 2015 11:35 am 
Offline
Newbie

Joined: Thu May 07, 2015 11:08 am
Posts: 3
@akerl that looks interesting! Would you happen to have a blog post, or be willing to post some minimal Linode specific instructions for me? Or any link at all would be useful.

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).


Top
   
PostPosted: Sat May 09, 2015 12:23 pm 
Offline
Senior Member

Joined: Mon Jul 05, 2010 5:13 pm
Posts: 392
shinji: I run kernels built from those configs on all my Linodes. As a warning, I'm running a fairly custom userspace (Arch-based, read-only, http://blog.akerl.org/2014/12/17/dock0-round-2/ for more details)

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 (https://github.com/dock0/vm_install/blo ... b/menu.lst) but the final product is just this:

Code:
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:

Code:
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


Top
   
PostPosted: Sat May 09, 2015 3:31 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
honi wrote:
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).


Try btrfs with docker, I find it works better than aufs and devicemapper

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group