FS#32057 - [linux] kernel memory cgroup support

Attached to Project: Arch Linux
Opened by suawekk (suawekk) - Thursday, 18 October 2012, 09:17 GMT
Last edited by Tobias Powalowski (tpowa) - Monday, 22 October 2012, 13:53 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Hello.

Current (3.6.2-1-ARCH) stable kernel does not ship with support for memory cgroup (CONFIG_MEMCG is disabled in kernel cfg).
I was wondering whether it's possible to enable it by default - this would be very handful for LXC/libvirt users.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Monday, 22 October 2012, 13:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  3.6.3-1
Comment by Thomas Bächler (brain0) - Thursday, 18 October 2012, 12:29 GMT
'Provides a memory resource controller that manages both anonymous memory and page cache. (See Documentation/cgroups/memory.txt)

Note that setting this option increases fixed memory overhead associated with each page of memory in the system. By this, 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory usage tracking struct at boot. Total amount of this is printed out at boot.

Only enable when you're ok with these trade offs and really sure you need the memory resource controller. Even when you enable this, you can set "cgroup_disable=memory" at your boot option to disable memory resource controller and you can avoid overheads. (and lose benefits of memory resource controller)

This config option also selects MM_OWNER config option, which could in turn add some fork/exit overhead.'

I don't think we want this.
Comment by Patrick McCarty (pnorcks) - Friday, 19 October 2012, 04:04 GMT
FWIW, memory cgroups were enabled in the 3.5.6 Arch kernel and earlier kernels, possibly since cgroups were introduced. The config options were renamed for 3.6 (see http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=c255a458055e459f65eb7b7f51dc5dbdd0caf1d8).

I use the MemoryLimit and MemorySoftLimit keys in a couple of systemd service files (see systemd.exec(5)), which rely on the memory cgroups functionality.
Comment by Rodrigo Sampaio Vaz (rodrigo.vaz) - Monday, 22 October 2012, 06:08 GMT
Definitively breaks LXC usage under libvirt since the error message states about missing memory controller while starting a LXC container and as Patrick said it was enabled in 3.5 kernels.
Comment by Tobias Powalowski (tpowa) - Monday, 22 October 2012, 10:07 GMT
Ok will add it again, for 3.6.3.

Loading...