Cgroups are supported on centos; Cgroups are used to limit, record, and isolate the physical resources used by process groups. In order to support cgroups on CentOS, libcgroups needs to be installed. You can use the "yum install libcgroup" command to install it.
The operating environment of this article: centos 7 system, Dell G3 computer.
In order to support cgroups on CentOS, libcgroups needs to be installed. Different Linux distributions are slightly different. You can use the following installation method under CentOS. However, default is usually installed.
Command: yum install libcgroup
Confirm the cpu subsystem of cgroups
Cgroups is a mechanism provided by the Linux kernel. This mechanism can combine a series of System tasks and their subtasks are integrated (or segregated) into different groups hierarchical by resource, thereby providing a unified framework for system resource management.
Cgroups can limit, record, and isolate the physical resources (including: CPU, memory, IO, etc.) used by process groups. It is essentially the system kernel attached to the program, providing a way to implement virtualization of containers. A series of hooks trigger corresponding hooks through the scheduling of resources when the program is running, thereby achieving the purpose of resource tracking and restriction. It provides basic guarantee and is the cornerstone for building a series of virtualization management tools such as Docker.
[root@liumiaocn ~]# mount -t cgroup cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) [root@liumiaocn ~]#
Confirm that the cgroup controlled by the CPU is /sys/fs/cgroup/cpu
Recommended tutorial: "centos tutorial"
The above is the detailed content of Does centos support cgroups?. For more information, please follow other related articles on the PHP Chinese website!