Show Table of Contents
1.3. Linux Kernel 的资源管控器
资源管控器(也称为 cgroup 子系统)代表一种单一资源:如 CPU 时间或者内存。Linux kernel 提供一系列资源管控器,由 systemd 自动挂载。如需参考目前已挂载的资源管控器列表,请参见
/proc/cgroups,或使用 lssubsys 监控工具。在 Red Hat Enterprise Linux 7 中,systemd 默认挂载以下管控器:
Red Hat Enterprise Linux 7 中可用的管控器
blkio—— 对输入 ∕ 输出访问存取块设备设定权限;cpu—— 使用 CPU 调度程序让 cgroup 的任务可以存取 CPU。它与cpuacct管控器一起挂载在同一 mount 上;cpuacct—— 自动生成 cgroup 中任务占用 CPU 资源的报告。它与cpu管控器一起挂载在同一 mount 上;cpuset—— 给 cgroup 中的任务分配独立 CPU(在多芯系统中)和内存节点;devices—— 允许或禁止 cgroup 中的任务存取设备;freezer—— 暂停或恢复 cgroup 中的任务;memory—— 对 cgroup 中的任务可用内存做出限制,并且自动生成任务占用内存资源报告;net_cls—— 使用等级识别符(classid)标记网络数据包,这让 Linux 流量控制器(tc指令)可以识别来自特定 cgroup 任务的数据包;perf_event—— 允许使用 perf 工具来监控 cgroup;hugetlb—— 允许使用大篇幅的虚拟内存页,并且给这些内存页强制设定可用资源量。
Linux Kernel 展示了一系列可用 systemd 配置的资源管控器可调参数。参数的详细描述请参阅 kernel 文档(kernel 管控器专项介绍 的参考列表)。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.