{{short description|Resource limit method in Linux}} {{Redirect|cgroup|other uses|C group (disambiguation){{!}}C group}} {{Use dmy dates|date=July 2020}} {{lowercase title}} {{Infobox software | name = cgroups | title = cgroups | logo = <!-- Image name is enough --> | logo caption = | logo_size = | logo_alt = | screenshot = <!-- Image name is enough --> | caption = | screenshot_size = | screenshot_alt = | collapsible = | author = v1: Paul Menage, Rohit Seth, Memory Controller by Balbir Singh, CPU controller by Srivatsa Vaddagiri<br />v2: Tejun Heo | developer = Tejun Heo, Johannes Weiner, Michal Hocko, Waiman Long, Roman Gushchin, Chris Down et&nbsp;al. | released = {{Start date and age|2007}} | discontinued = | latest release version = | latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | latest preview version = | latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | status = | programming language = C | operating system = Linux | platform = | size = | language = | language count = <!-- DO NOT include this parameter unless you know what it does --> | language footnote = | genre = System software | license = GPL and LGPL | website = {{URL|https://docs.kernel.org/admin-guide/cgroup-v1/|Cgroup v1}}, {{URL|https://docs.kernel.org/admin-guide/cgroup-v2.html|Cgroup v2}} }}

'''cgroups''' (abbreviated from '''control groups''') is a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, etc.)<ref name=v2doc/>{{rp|at=&sect; Controllers}} of a collection of processes.

Engineers at Google started the work on this feature in 2006 under the name "process containers".<ref>{{Cite news |date=29 May 2007 |author= Jonathan Corbet |title= Process containers |publisher= LWN.net |url= //lwn.net/Articles/236038/ }}</ref> In late 2007, the nomenclature changed to "control groups" to avoid confusion caused by multiple meanings of the term "container" in the Linux kernel context, and the control groups functionality was merged into the Linux kernel mainline in kernel version 2.6.24, which was released in January 2008.<ref name="lwn-notes">{{Cite news |date=29 October 2007 |author=Jonathan Corbet |title=Notes from a container |publisher=LWN.net |url=//lwn.net/Articles/256389/ | access-date=2015-04-14 | quote=The original 'containers' name was considered to be too generic – this code is an important part of a container solution, but it's far from the whole thing. So containers have now been renamed 'control groups' (or 'cgroups') and merged for 2.6.24.}}</ref> Since then, developers have added controllers for the kernel's own memory allocation,<ref name=kmemcg/> netfilter firewalling,<ref name=netfilter>{{cite web|url=http://www.spinics.net/lists/netdev/msg264727.html |title=netfilter: x_tables: lightweight process control group matching |date=2014-04-23 |url-status=dead |archive-url=https://web.archive.org/web/20140424095421/http://www.spinics.net/lists/netdev/msg264727.html |archive-date=24 April 2014 |df=dmy }}</ref> the OOM killer,<ref name=oom/> and many other parts.

A major change in the history of cgroups is '''cgroup v2''', which removes the ability to use multiple process hierarchies and to discriminate between threads as found in the original cgroup (now called "v1").<ref name=v2doc/>{{rp|at=&sect; Issues with v1 and Rationales for v2}} Work on the single, unified hierarchy started with the repurposing of v1's dummy hierarchy as a place for holding all controllers not yet used by others in 2014.<ref name=unihier>{{cite web |url=https://lkml.org/lkml/2014/3/13/503 |title=cgroup: prepare for the default unified hierarchy |date=2014-03-13}}</ref> cgroup v2 was merged in Linux kernel 4.5 (2016).<ref name="v2-doc-4.5"/>

== Versions == There are two versions of cgroups. They can co-exist in a system.

* The original version of cgroups was written by Paul Menage and Rohit Seth. It was merged into the mainline Linux kernel in 2007 (2.6.2). Development and maintenance of cgroups was then taken over by Tejun Heo, who instituted major redesigns without breaking the interface (see {{section link||Redesigns of v1}}). It was renamed "Control Group version 1" (cgroup-v1) after cgroups-v2 appeared in Linux 4.5.<ref>{{cite web |url=https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/diff/Documentation/cgroup-v1?id=v4.5&id2=v4.4 |title=diff between Linux kernel 4.4 and 4.5 |date=2016-03-14}}</ref> * Tejun Heo found that further redesign of v1 could not proceed without breaking the interface. As a result, he added a separate, new system called "Control Group version 2" (cgroup-v2). Unlike v1, cgroup v2 has only a single process hierarchy (because a controller can only be assigned to one hierarchy, processes in separate hierarchies cannot be managed by the same controller; this change sidesteps the issue). It also removes the ability to discriminate between threads, choosing to work on a granularity of processes instead (disabling an "abuse" of the system which led to convoluted APIs).<ref name=v2doc/>{{rp|at=&sect; Issues with v1 and Rationales for v2}} The first version of the unified hierarchy The document first appeared in Linux kernel 4.5 released on 14 March 2016.<ref name="v2-doc-4.5">{{cite web |url=https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/diff/Documentation/cgroup-v2.txt?id=v4.5&id2=v4.4 |title=Documentation/cgroup-v2.txt as appeared in Linux kernel 4.5 |date=2016-03-14}}</ref>

== Features == One of the design goals of cgroups is to provide a unified interface to many different use cases, from controlling single processes (by using nice, for example) to full operating system-level virtualization (as provided by OpenVZ, Linux-VServer or LXC, for example). Cgroups provides:

; Resource limiting : groups can be set not to exceed a configured memory limit, which also includes the file system cache,<ref>{{Cite news |date=31 July 2007 |author= Jonathan Corbet | title = Controlling memory use in containers | publisher=LWN |url = //lwn.net/Articles/243795/}}</ref><ref name="ols-memcg">{{cite web |title=Containers: Challenges with the memory resource controller and its performance | author= Balbir Singh, Vaidynathan Srinivasan | date = July 2007| publisher = Ottawa Linux Symposium | url = https://www.kernel.org/doc/ols/2007/ols2007v2-pages-209-222.pdf }}</ref> I/O bandwidth limit,<ref>{{Cite web |last=Carvalho |first=André |title=Using cgroups to limit I/O |url=https://andrestc.com/post/cgroups-io/ |access-date=2022-09-12 |website=andrestc.com|date=18 October 2017 }}</ref> CPU quota limit,<ref>{{Cite web |last=Luu |first=Dan |title=The container throttling problem |url=https://danluu.com/cgroup-throttling/ |access-date=2022-09-12 |website=danluu.com}}</ref> CPU set limit,<ref>{{Cite web |last=Derr |first=Simon |date=2004 |title=CPUSETS |url=https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt |access-date=2022-09-12}}</ref> or maximum open files.<ref>{{Cite web |title=setrlimit(2) — Arch manual pages |url=https://man.archlinux.org/man/setrlimit.2.en |access-date=2023-11-27 |website=man.archlinux.org}}</ref> ; Prioritization : some groups may get a larger share of CPU utilization<ref>{{Cite news | date = 23 October 2007 | author = Jonathan Corbet | title = Kernel space: Fair user scheduling for Linux | publisher = Network World | url = http://www.networkworld.com/news/2007/101207-kernel.html | access-date = 2012-08-22 | archive-url = https://web.archive.org/web/20131019123524/http://www.networkworld.com/news/2007/101207-kernel.html | archive-date = 19 October 2013 | url-status = dead | df = dmy-all }}</ref> or disk I/O throughput<ref>{{cite conference | date = 19 November 2008 | author = Kamkamezawa Hiroyu | title = Cgroup and Memory Resource Controller | format = PDF presentation slides | publisher = Japan Linux Symposium | url = http://www.linuxfoundation.jp/jp_uploads/seminar20081119/CgroupMemcgMaster.pdf | url-status = dead | archive-url = https://web.archive.org/web/20110722113016/http://www.linuxfoundation.jp/jp_uploads/seminar20081119/CgroupMemcgMaster.pdf | archive-date = 22 July 2011 | df = dmy-all }}</ref> ; Accounting : measures a group's resource usage, which may be used, for example, for billing purposes<ref name=lf-hansen>{{cite conference | vauthors=Hansen D, ((IBM Linux Technology Center)) | title = Resource Management | format = PDF presentation slides | publisher = Linux Foundation | url = https://events.static.linuxfound.org/slides/lfcs09_hansen2.pdf | date = 2009}}</ref> ; Control : freezing groups of processes, their checkpointing and restarting<ref name=lf-hansen />

== {{Anchor|USAGE}}Use == thumb|right|upright=1.9|As an example of indirect usage, systemd assumes exclusive access to the cgroups facility

A control group (abbreviated as cgroup) is a collection of processes that are bound by the same criteria and associated with a set of parameters or limits. These groups can be hierarchical, meaning that each group inherits limits from its parent group. The kernel provides access to multiple controllers (also called subsystems) through the cgroup interface;<ref name=lwn-notes /> for example, the "memory" controller limits memory use, "cpuacct" accounts CPU usage, etc.

Control groups can be used in multiple ways: * By accessing the cgroup virtual file system manually. * By creating and managing groups on the fly using tools like <code>cgcreate</code>, <code>cgexec</code>, and <code>cgclassify</code> (from <code>libcgroup</code>). * Through the "rules engine daemon" that can automatically move processes of certain users, groups, or commands to cgroups as specified in its configuration. * Indirectly through other software that uses cgroups, such as Docker, Firejail, LXC,<ref>{{Cite news |author=Matt Helsley |date=3 February 2009 |title=LXC: Linux container tools |publisher=IBM developerWorks |url=https://www.ibm.com/developerworks/linux/library/l-lxc-containers/ }}</ref> libvirt, systemd, Open Grid Scheduler/Grid Engine,<ref>{{cite web |url=http://blogs.scalablelogic.com/2012/05/grid-engine-cgroups-integration.html |title=Grid Engine cgroups Integration| date=2012-05-22 |publisher=Scalable Logic}}</ref> and Google's developmentally defunct lmctfy.

The Linux kernel documentation contains some technical details of the setup and use of control groups version 1<ref name=v1doc>{{cite web |url=https://docs.kernel.org/admin-guide/cgroup-v1/index.htm|title = Control Groups version 1|website=docs.kernel.org}}</ref> and version 2.<ref name=v2doc>{{Cite web|url=https://docs.kernel.org/admin-guide/cgroup-v2.html|title = Control Group v2|website=docs.kernel.org}}<p>Sections referenced in this document:</p>

* [https://docs.kernel.org/admin-guide/cgroup-v2.html#controllers Controllers] * [https://docs.kernel.org/admin-guide/cgroup-v2.html#issues-with-v1-and-rationales-for-v2 Issues with v1 and Rationales for v2]</ref>

=== Interfaces === Both versions of cgroup act through a pseudo-filesystem ({{code|cgroup}} for v1 and {{code|cgroup2}} for v2). Like all filesystems they can be mounted on any path, but the general convention is to mount one of the versions (generally v2) on {{code|/sys/fs/cgroup}} under the sysfs default location of {{code|/sys}}. As mentioned before the two cgroup versions can be active at the same time; this too applies to the filesystems so long as they are mounted to a different path.<ref name=v1doc/><ref name=v2doc/> For the description below we assume a setup where the v2 hierarchy lies in {{code|/sys/fs/cgroup}}. The v1 hierarchy, if ever required, will be mounted at a different location.

At initialization cgroup2 should have no defined control groups except the top-level one. In other words, {{code|/sys/fs/cgroup}} should have no directories, only a number of files that control the system as a whole. At this point, running {{code|ls /sys/fs/cgroup}} could list the following on one example system:

{{div col|colwidth=12em}} * <code>cgroup.controllers</code> * <code>cgroup.max.depth</code> * <code>cgroup.max.descendants</code> * <code>cgroup.pressure</code> * <code>cgroup.procs</code> * <code>cgroup.stat</code> * <code>cgroup.subtree_control</code> * <code>cgroup.threads</code> * <code>cpu.pressure</code> * <code>cpuset.cpus.effective</code> * <code>cpuset.cpus.isolated</code> * <code>cpuset.mems.effective</code> * <code>cpu.stat</code> * <code>cpu.stat.local</code> * <code>io.cost.model</code> * <code>io.cost.qos</code> * <code>io.pressure</code> * <code>io.prio.class</code> * <code>io.stat</code> * <code>irq.pressure</code> * <code>memory.numa_stat</code> * <code>memory.pressure</code> * <code>memory.reclaim</code> * <code>memory.stat</code> * <code>memory.zswap.writeback</code> * <code>misc.capacity</code> * <code>misc.current</code> * <code>misc.peak</code> {{div col end}}

These files are named according to the controllers that handle them. For example, {{code|cgroup.*}} deal with the cgroup system itself and {{code|memory.*}} deal with the memory subsystem. Example: to request the kernel to 1 gigabyte of memory from anywhere in the system, one can run <code>echo "1G swappiness=50" > /sys/fs/cgroup/memory.reclaim</code>.<ref name=v2doc/>

To create a subgroup, one simply creates a new directory under an existing group (including the top-level one). The files corresponding to available controls for this group are automatically created.<ref name=v2doc/> For example, running <code>mkdir /sys/fs/cgroup/example; ls /sys/fs/cgroup/example</code> would produce a list of files largely similar to the one above, but with noticeable changes. On one example system, these files are added: {{div col|colwidth=12em}} * <code>cgroup.events</code> * <code>cgroup.freeze</code> * <code>cgroup.kill</code> * <code>cgroup.type</code> * <code>cpu.idle</code> * <code>cpu.max</code> * <code>cpu.max.burst</code> * <code>cpu.pressure</code> * <code>cpu.uclamp.max</code> * <code>cpu.uclamp.min</code> * <code>cpu.weight</code> * <code>cpu.weight.nice</code> * <code>memory.current</code> * <code>memory.events</code> * <code>memory.events.local</code> * <code>memory.high</code> * <code>memory.low</code> * <code>memory.max</code> * <code>memory.min</code> * <code>memory.oom.group</code> * <code>memory.peak</code> * <code>memory.swap.current</code> * <code>memory.swap.events</code> * <code>memory.swap.high</code> * <code>memory.swap.max</code> * <code>memory.swap.peak</code> * <code>memory.zswap.current</code> * <code>memory.zswap.max</code> * <code>pids.current</code> * <code>pids.events</code> * <code>pids.events.local</code> * <code>pids.max</code> * <code>pids.peak</code> {{div col end}}

These changes are not unexpected because some controls and statistics only make sense on a subset of processes (e.g. nice level being the CPU priority of processes relative to the rest of the system).<ref name=v2doc/>

Processes are assigned to subgroups by writing to <code>/proc/&lt;PID&gt;/cgroup</code>. The cgroup a process is in can be found by reading the same file.<ref name=v2doc/>

On systems based on systemd, a hierarchy of subgroups is predefined to encapsulate every process directly and indirectly launched by systemd under a subgroup: the very basis of how systemd manages processes. An explanation of the nomenclature of these groups can be found in the Red Hat Enterprise Linux 7 manual.<ref>{{cite web |title=1.2. Default Cgroup Hierarchies {{!}} Resource Management Guide {{!}} Red Hat Enterprise Linux {{!}} 7 {{!}} Red Hat Documentation |url=https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/resource_management_guide/sec-default_cgroup_hierarchies |website=docs.redhat.com}}</ref> Red Hat also provides a guide on creating a systemd service file that causes a process to run in a separate cgroup.<ref>{{cite web |title=Managing cgroups with systemd |url=https://www.redhat.com/en/blog/cgroups-part-four |website=www.redhat.com |language=en}}</ref>

<code>systemd-cgtop</code><ref>{{Cite web|url=https://www.freedesktop.org/software/systemd/man/systemd-cgtop.html|title = Systemd-cgtop}}</ref> command can be used to show top control groups by their resource usage.

==== V1 coexistence ==== On a system with v2, v1 can still be mounted and given access to controllers ''not'' in use by v2. However, a modern system typically already places all controllers in use in v2, so there is no controller available for v1 at all even if a hierarchy is created. It is possible to clear all uses of a controller from v2 and hand it to v1, but moving controllers between hierarchies after the system is up and running is cumbersome and not recommended.<ref name=v2doc/>

== Major evolutions ==

=== Redesigns of v1 === Redesign of cgroups started in 2013,<ref name="cgroups redesign by Tejun Heo">{{cite web |url=https://www.linuxfoundation.org/blog/2013/08/all-about-the-linux-kernel-cgroups-redesign/ |title=All About the Linux Kernel: Cgroup's Redesign |work=Linux.com |date=2013-08-15 |access-date=2014-05-19 |archive-date=28 April 2019 |archive-url=https://web.archive.org/web/20190428203713/https://www.linuxfoundation.org/blog/2013/08/all-about-the-linux-kernel-cgroups-redesign/ |url-status=dead }}</ref> with additional changes brought by versions 3.15 and 3.16 of the Linux kernel.<ref>{{cite web |url=//lwn.net/Articles/601840/ |title=The unified control group hierarchy in 3.16 |publisher=LWN.net |date=2014-06-11}}</ref><ref>{{cite web |url=https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=32d01dc7be4e725ab85ce1d74e8f4adc02ad68dd |title=Pull cgroup updates for 3.15 from Tejun Heo |publisher=kernel.org |date=2014-04-03}}</ref><ref>{{cite web |url=https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=14208b0ec56919f5333dd654b1a7d10765d0ad05 |title=Pull cgroup updates for 3.16 from Tejun Heo |publisher=kernel.org |date=2014-06-09}}</ref>

The following changes concern the kernel before 4.5/4.6, i.e. when cgroups-v2 were added. In other words they describe how cgroups-v1 had been changed, though most of them have also been inherited into v2 (after all, v1 and v2 share the same codebase).

==== {{Anchor|NAMESPACE-ISOLATION}}Namespace isolation ==== {{Main|Linux namespaces}} While not technically part of the cgroups work, a related feature of the Linux kernel is ''namespace isolation'', where groups of processes are separated such that they cannot "see" resources in other groups. For example, a PID namespace provides a separate enumeration of process identifiers within each namespace. Also available are mount, user, UTS (Unix Time Sharing), network and SysV IPC namespaces. * The ''PID namespace'' provides isolation for the allocation of process identifiers (PIDs), lists of processes and their details. While the new namespace is isolated from other siblings, processes in its "parent" namespace still see all processes in child namespaces—albeit with different PID numbers.<ref name=lwn-pid>{{Cite news |author=Pavel Emelyanov, Kir Kolyshkin |date=19 November 2007 |title=PID namespaces in the 2.6.24 kernel |publisher=LWN.net |url=//lwn.net/Articles/259217/ }}</ref> * ''Network namespace'' isolates the network interface controllers (physical or virtual), iptables firewall rules, routing tables etc. Network namespaces can be connected with each other using the "veth" virtual Ethernet device.<ref>{{Cite news |date=30 January 2007 |author=Jonathan Corbet |title=Network namespaces |publisher=LWN.net |url=//lwn.net/Articles/219794/ }}</ref> * ''"UTS" namespace'' allows changing the hostname. * ''Mount namespace'' allows creating a different file system layout, or making certain mount points read-only.<ref>{{Cite news |author=Serge E. Hallyn, Ram Pai |date=17 September 2007 |title=Applying mount namespaces |publisher=IBM developerWorks |url=https://www.ibm.com/developerworks/linux/library/l-mount-namespaces.html }}</ref> * ''IPC namespace'' isolates the System V inter-process communication between namespaces. * ''User namespace'' isolates the user IDs between namespaces.<ref>{{Cite news | date= 27 February 2013| author=Michael Kerrisk|title=Namespaces in operation, part 5: User namespaces|publisher=lwn.net Linux Info from the Source|url=//lwn.net/Articles/532593/}}</ref> * ''Cgroup namespace''<ref>{{Cite web|url=https://lkml.org/lkml/2016/3/26/132/|title=LKML: Linus Torvalds: Linux 4.6-rc1}}</ref>

Namespaces are created with the "unshare" command or syscall, or as "new" flags in a "clone" syscall.<ref>{{cite web |date=11 January 2006 |author=Janak Desai |title=Linux kernel documentation on unshare |url=https://www.mjmwired.net/kernel/Documentation/unshare.txt }}</ref>

The "ns" subsystem was added early in cgroups development to integrate namespaces and control groups. If the "ns" cgroup was mounted, each namespace would also create a new group in the cgroup hierarchy. This was an experiment that was later judged to be a poor fit for the cgroups API, and removed from the kernel.

Linux namespaces were inspired by the more general namespace functionality used heavily throughout Plan 9 from Bell Labs.<ref>{{cite web | title=The Use of Name Spaces in Plan 9 | date=1992 | url=http://www.cs.bell-labs.com/sys/doc/names.html | access-date=15 February 2015 | archive-url=https://web.archive.org/web/20140906153815/http://www.cs.bell-labs.com/sys/doc/names.html | archive-date=6 September 2014 | url-status=dead | df=dmy-all }}</ref>

==== Conversion to kernfs ==== Kernfs was introduced into the Linux kernel with version 3.14 in March 2014, the main author being Tejun Heo.<ref>{{cite web |url=//lwn.net/Articles/584019/ |title=kernfs, sysfs, driver-core: implement synchronous self-removal |publisher=LWN.net |date=2014-02-03 |access-date=2014-04-07}}</ref> One of the main motivators for a separate kernfs is the cgroups file system. Kernfs is basically created by splitting off some of the sysfs logic into an independent entity, thus easing for other kernel subsystems the implementation of their own virtual file system with handling for device connect and disconnect, dynamic creation and removal, and other attributes. This does not affect how cgroups is used, but makes maintaining the code easier.<ref name=convert-kernfs>{{cite web | url = https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2bd59d48ebfb3df41ee56938946ca0dd30887312 | title = Linux kernel source tree: kernel/git/torvalds/linux.git: cgroups: convert to kernfs | date = 2014-02-11 | access-date = 2014-05-23 | publisher = kernel.org }}</ref>

==== New features introduced during v1 ==== ''Kernel memory control groups'' (''{{vanchor|kmemcg}}'') were merged into version 3.8 ({{release date and age|df=yes|18|02|2013}}) of the Linux kernel mainline.<ref>{{cite web |url= https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7ae1e1d0f8ac2927ed7e3ca6d15e42d485903459 |title= memcg: kmem controller infrastructure |publisher=kernel.org source code|date=2012-12-18 }}</ref><ref>{{cite web |url=https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=510fc4e11b772fd60f2c545c64d4c55abd07ce36 |title= memcg: kmem accounting basic infrastructure |publisher=kernel.org source code |date=2012-12-18}}</ref><ref name=kmemcg>{{cite web |url= https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d5bdae7d59451b9d63303f7794ef32bb76ba6330 |title= memcg: add documentation about the kmem controller |publisher=kernel.org |date=2012-12-18}}</ref> The kmemcg controller can limit the amount of memory that the kernel can utilize to manage its own internal processes.

Support for per-group netfilter setup was added in 2014.<ref name=netfilter/>

The unified hierarchy was added in 2014. It repurposes of v1's dummy hierarchy to hold all controllers not yet used by others. This changed dummy hierarchy would become the only available hierarchy in v2.<ref name=unihier>{{cite web |url=https://lkml.org/lkml/2014/3/13/503 |title=cgroup: prepare for the default unified hierarchy |date=2014-03-13}}</ref>

=== Changes after v2 === Unlike v1, cgroup v2 has only a single process hierarchy and discriminates between processes, not threads.

==== cgroup awareness of OOM killer ==== Linux Kernel 4.19 (October 2018) introduced cgroup awareness of OOM killer implementation which adds an ability to kill a cgroup as a single unit and so guarantee the integrity of the workload.<ref name=oom>{{cite web | url=https://kernelnewbies.org/Linux_4.19#Memory_management | title=Linux_4.19 - Linux Kernel Newbies }}</ref>

== {{Anchor|ADOPTION}}Adoption == Various projects use cgroups as their basis, including CoreOS, Docker (in 2013), Hadoop, Jelastic, Kubernetes,<ref name="mesosphere">{{cite web |url=https://mesosphere.com/blog/2014/07/10/mesosphere-announces-kubernetes-on-mesos/ |title=Mesosphere to Bring Google's Kubernetes to Mesos |publisher=Mesosphere.io |date=2014-07-10 |access-date=2014-07-13 |archive-url=https://web.archive.org/web/20150906165229/https://mesosphere.com/blog/2014/07/10/mesosphere-announces-kubernetes-on-mesos/ |archive-date=6 September 2015 |url-status=dead }}</ref> lmctfy (Let Me Contain That For You), LXC (Linux Containers), systemd, Mesos and Mesosphere,<ref name="mesosphere"/> HTCondor, and Flatpak.

Major Linux distributions also adopted it such as Red Hat Enterprise Linux (RHEL) 6.0 in November 2010, three years before adoption by the mainline Linux kernel.<ref>{{cite web|url=https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/pdf/6.0_release_notes/red_hat_enterprise_linux-6-6.0_release_notes-en-us.pdf|title=Red Hat Enterprise Linux - 6.0 Release Notes|website=redhat.com|access-date=12 September 2023}}</ref>

On 29 October 2019, the Fedora Project modified Fedora 31 to use CgroupsV2 by default.<ref>{{Cite web|url=https://bugzilla.redhat.com/show_bug.cgi?id=1732114|title=1732114 – Modify Fedora 31 to use CgroupsV2 by default}}</ref>

== See also == {{Portal|Free and open-source software|Linux}} * Operating system-level virtualization implementations * Process group * Tc (Linux){{snd}} a traffic control utility slightly overlapping in functionality with network-oriented cgroup settings * Job object{{snd}} the equivalent Windows concept, as managed by that platform’s Object Manager

== References == {{Reflist|30em}}

== External links == * [https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html Official Linux kernel documentation on cgroups v1] and [https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html cgroups v2] * [https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide/ch01 Red Hat Resource Management Guide on cgroups] * [http://manpages.ubuntu.com/manpages/cosmic/man7/cgroups.7.html Ubuntu manpage on cgroups] {{Webarchive|url=https://web.archive.org/web/20210809192233/http://manpages.ubuntu.com/manpages/cosmic/man7/cgroups.7.html |date=9 August 2021 }} * [http://www.haifux.org/lectures/299/netLec7.pdf Linux kernel Namespaces and cgroups by Rami Rosen] (2013) * [https://www.netdevconf.org/1.1/proceedings/slides/rosen-namespaces-cgroups-lxc.pdf Namespaces and cgroups, the basis of Linux containers (including cgroups v2)], slides of a talk by Rami Rosen, Netdev 1.1, Seville, Spain, 2016 * [//lwn.net/Articles/679786 Understanding the new control groups API], LWN.net, by Rami Rosen, March 2016 * [https://static.googleusercontent.com/media/research.google.com/en/us/pubs/archive/43438.pdf Large-scale cluster management at Google with Borg], April 2015, by Abhishek Verma, Luis Pedrosa, Madhukar Korupolu, David Oppenheimer, Eric Tune and John Wilkes * [https://msdn.microsoft.com/en-us/library/windows/desktop/ms684161(v=vs.85).aspx Job Objects], similar feature on Windows

{{Virtualization software}} {{Linux kernel}}

Category:Interfaces of the Linux kernel Category:Linux kernel features Category:Operating system security Category:Virtualization software for Linux