cgroups v2 ppt
从Linux 4.5内核开始cgroup v2接口已经被标记为官方发布,意味着不再使用devel标签并且可以作为新型cgroup2 fs类型来挂载。Goals of the v2 inter faceLAW&ORDERGoals of the v2 inter face● ConsistencyOne way to achieve one goal. This aint perlUsability not implementabilityFlexibility with purposea set of consistent interfaces and behaviors toprovide a hierarchical grouping of processes andover lay various resource controls over thehierarchyThe unified hierarchyThe one hierarchical grouping of processesA process's cgroup membership can bespecified with a single pathDifferent controllers have a common ground totalk to each otherper-process, not per-threadSeparation between organization and controlcgroup subtree controlo Enable disable controllers on the childrengroups of a given cgroupTop-downNo tasks in internal nodesA(b, m)-b(b, m-c(b)d(b-Ea is the root and has all controllers enabled1. echo +blkio >A/cgroup subtree controlo blkio enabled on b2. echo +blkio >A/B/cgroup subtree controlo blkio enabled on c and d3. echo +memory >A/cgroup subtree controlo memory enabled on BA(b, m)-b(b, m-c(b)d(b-EACblkioAB_BBCDDBEDBmemory ABA(b, m)-b(b, m-c(b)d(b-Eo Any controller which has any controllerenabled in its cgroup subtree control canthave processes in them.Root is the only exceptionA, C, d and e can have processes in them butBcan3t。Groups and processes never compete directlyGroups compete against groups. Processes competeagainst processes within its groupA(b, m)-b(b, m-c(b)d(b-EACblkioABBBCDDBEDBmemory AB
暂无评论