Difference between revisions of "Cgroups"
Jump to navigation
Jump to search
↑ https://kernelnewbies.org/Linux_5.4#More_accurate_cgroup_I.2FO_control_with_blk-iocost
↑ https://www.freedesktop.org/software/systemd/man/systemd-cgtop.html
(Created page with "{{Draft}} == See also == * <code>systemd-cgtop</code><ref>https://www.freedesktop.org/software/systemd/man/systemd-cgtop.html</ref>, <code>docker stats</code> * <cod...") |
|||
(36 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Draft}} | {{Draft}} | ||
+ | ==Packages== | ||
+ | cgroups functionality that was released in [[Linux Kernel]] version [[2.6.24]] | ||
+ | |||
+ | Packages: | ||
+ | * <code>[[cgroup-lite]]</code>: <code>[[cgroups-mount]], [[cgroups-umount]]</code> | ||
+ | * <code>[[cgroup-tools]]</code>: <code>[[cgcreate]]</code>, <code>[[cgexec]]</code>, <code>[[lscgroup]]</code> among others | ||
+ | * <code>[[cgroupfs-mount]]</code> | ||
+ | |||
+ | |||
+ | |||
+ | [[systemd-cgls]] | ||
+ | [[systemd-cgls]] memory | ||
+ | [[systemd-cgtop]] | ||
+ | |||
+ | ==Basic Commands== | ||
+ | *Create a group : <code>[[cgcreate]] -g memory:myGroup</code> | ||
+ | *<code>[[cgexec]] -g memory:myGroup YOUR_PROGRAM_TO_EXEC</code> | ||
+ | |||
+ | |||
+ | * You can use <code>[[cgget]]</code> to view the current limits, usage, & high watermarks of the group: | ||
+ | sudo [[cgget]] -g memory:/myGroup|grep bytes | ||
+ | memory.kmem.tcp.usage_in_bytes: 0 | ||
+ | memory.soft_limit_in_bytes: 9223372036854771712 | ||
+ | memory.kmem.tcp.max_usage_in_bytes: 0 | ||
+ | memory.max_usage_in_bytes: 0 | ||
+ | memory.limit_in_bytes: 9223372036854771712 | ||
+ | memory.kmem.max_usage_in_bytes: 0 | ||
+ | memory.usage_in_bytes: 0 | ||
+ | memory.kmem.limit_in_bytes: 9223372036854771712 | ||
+ | memory.kmem.usage_in_bytes: 0 | ||
+ | memory.kmem.tcp.limit_in_bytes: 9223372036854771712 | ||
+ | |||
+ | [[I/O]] control, more accurate cgroup I/O control with <code>blk-iocost</code><ref>https://kernelnewbies.org/Linux_5.4#More_accurate_cgroup_I.2FO_control_with_blk-iocost</ref> | ||
+ | |||
+ | == Related terms == | ||
+ | * <code>[[ulimit]]</code> | ||
+ | * [[Cgroups: cgroup mountpoint does not exist: unknown]] | ||
+ | * [[Cgroups v2]] | ||
+ | Sep 21 11:23:14 yourhostame dockerd[1850]: time="2023-09-21T11:23:14.096834108Z" level=warning msg="Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without [[swap]]." | ||
+ | |||
+ | == Activities == | ||
+ | * Read https://wiki.archlinux.org/index.php/cgroups | ||
+ | * How to limit to CPU and Memory : [[cgcreate]] | ||
== See also == | == See also == | ||
* <code>[[systemd-cgtop]]</code><ref>https://www.freedesktop.org/software/systemd/man/systemd-cgtop.html</ref>, <code>[[docker stats]]</code> | * <code>[[systemd-cgtop]]</code><ref>https://www.freedesktop.org/software/systemd/man/systemd-cgtop.html</ref>, <code>[[docker stats]]</code> | ||
* <code>[[netdata]]</code> cgroups plugin | * <code>[[netdata]]</code> cgroups plugin | ||
+ | * {{containers}} | ||
+ | * {{cgroups}} | ||
+ | |||
+ | [[Category:Linux]] |
Latest revision as of 11:31, 21 September 2023
This article is a Draft. Help us to complete it.
Packages[edit]
cgroups functionality that was released in Linux Kernel version 2.6.24
Packages:
cgroup-lite
:cgroups-mount, cgroups-umount
cgroup-tools
:cgcreate
,cgexec
,lscgroup
among otherscgroupfs-mount
systemd-cgls systemd-cgls memory systemd-cgtop
Basic Commands[edit]
- You can use
cgget
to view the current limits, usage, & high watermarks of the group:
sudo cgget -g memory:/myGroup|grep bytes memory.kmem.tcp.usage_in_bytes: 0 memory.soft_limit_in_bytes: 9223372036854771712 memory.kmem.tcp.max_usage_in_bytes: 0 memory.max_usage_in_bytes: 0 memory.limit_in_bytes: 9223372036854771712 memory.kmem.max_usage_in_bytes: 0 memory.usage_in_bytes: 0 memory.kmem.limit_in_bytes: 9223372036854771712 memory.kmem.usage_in_bytes: 0 memory.kmem.tcp.limit_in_bytes: 9223372036854771712
I/O control, more accurate cgroup I/O control with blk-iocost
[1]
Related terms[edit]
Sep 21 11:23:14 yourhostame dockerd[1850]: time="2023-09-21T11:23:14.096834108Z" level=warning msg="Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap."
Activities[edit]
- Read https://wiki.archlinux.org/index.php/cgroups
- How to limit to CPU and Memory : cgcreate
See also[edit]
systemd-cgtop
[2],docker stats
netdata
cgroups plugin- Containers, OCI: Docker (
dockerd
),containerd
,runc
, Podman, buildah, skopeo, lxd, Container Registry, Service mesh, Windows Server containers, Containerpilot, CoreOS, CAdvisor, Containers networking, Container scanning, cosign, CRI, CRI-O,initContainers
, Sidecar container, Container images, latest cgroups
:cgcreate, cgroups v2
Advertising: