as more documentation for Linux Cgroup, you can look at the following documents:
Official documentation for Linux kernel
Official Documents of Redhat
Cgroup's terminologyCgroup has the following terms:
Task: is a process of the system.
control group: A group of processes, such as professor and student in official documents, or WWW and system, that represent a group of process
Cgroup study notes, cgroup
The cgroups system is a process group-based resource management framework provided by the Linux kernel. It can limit available resources for specific process groups. For details, refer to Mr. Zhou Mingyao'sCGroupIntroductionShao,YingUseRealExamples and principles 【1]This article describes the concept, structure, and principle of cgroup
This series of articles will introduce the concept of cgroup, The cgroup framework, and the subsystem of cgroup.
What cgroup?
Control groups provide a mechanic foraggregating/partitioning sets of tasks, and all their future children, define hierarchical groups with specialized behaviour. -- AdjustOf tasks are managed
Create new cgroup
This process is mkdir/cgroup/CPU/test_cpu: Create a cgroup in A/cgroup/CPU hierarchy. The following BT creates a cgroup under the CPU hierarchy:
mkdir /cgroup/cpu/test_cpu74447177 8388 (mkdir) call trace: 0xfffff
Cgroup Framework Structure
In this chapter, we will first introduce the Framework Structure of a cgroup and the corresponding file definitions of the cgroup file system. Here, let's take a look at the main structural relationships of cgroup:
Figure 2 main data structure relationships
This figure contains all the major
Use cgroup to restrict disk io of processes, and cgroup process disk io
Cat/etc/cgconfig. conf
#
# Copyright IBM Corporation. 2007
#
# Authors: Balbir Singh
# This program is free software; you can redistribute it and/or modify it
# Under the terms of version 2.1 of the GNU Lesser General Public License
# As published by the Free Software Foundation.
#
# This program is distributed in the hope that it woco
Cgroup IntroductionCgroup is the abbreviation for control group, which provides a mechanism for the task aggregation and partitioning of the Linux kernel, which organizes some tasks into one or more subsystems through a set of parameter sets.CGROUPS is the acronym for Control groups, originally presented by Google engineers and later compiled into the Linux kernel.Cgroups is the underlying foundation of the Resource Management Control section for IaaS
Although you have jail me into a specific environment through namespace, the processes I use in the CPU, memory, disk, and so on, can actually be arbitrary. So, we want to limit or control the resources used in the process. That's why Linux cgroup out.The Linux cgroup full name Linux control group is a function of the Linux kernel to restrict, control and detach resources (such as CPU, memory, disk input an
First, Cgroup Introduction:According to official documents, RHEL6 has prepared a new feature for the kernel------resource control, also known as Cgroup. The package for this service is libcgroup. With this, you can allocate resources such as CPU time, system memory, network bandwidth, and so on. This is controlled by the Cgconfig service. If this service is not started, there will be no content in the
Please see: http://www.ibm.com/developerworks/cn/linux/1506_cgroup/index.htmlCGroup introductionCGroup is the abbreviation for Control Groups, which is a mechanism provided by the Linux kernel to restrict, record, and isolate the material resources (such as CPU memory I/O) used by process groups (processes Groups). 2007 entered the Linux 2.6.24 kernel, CGroups is not a new creation, it will process management from Cpuset, the author is Google's Paul menage. CGroups is also the resource managemen
Reference:Http://www.ibm.com/developerworks/cn/linux/1506_cgroup/index.htmlHttp://baike.baidu.com/link?url=o3EDZZKaX9NJx8G1KvBgAj_Cnh9Z9yZXvcSaiIAVrkZ6je5VmVrab9QbEUq50XBSTOpYpc0opyeuUEw0dE5U9q"KVM Virtualization Technology Practical and Principle analysis"Brief introduction:In KVM we can assign resources to clients using parameters such as-M-SMP, but this allocation is a coarse-grained resource allocation, assuming a scenario where two clients on the local disk provide MySQL services, but one o
The cgroups system is a framework of process group-based resource management provided by the Linux kernel that can qualify resources that can be used for specific process groups. The specific introduction can refer to Mr. Zhou Mingyao's CGroup , practical Examples and principles described . 1", the article described in detail the concept of cgroup, structure, principles, and give an example of the appli
1 Use: Create Tree and attach subsystem
The first thing to do is to create the file system mount point as the root of the tree
Mkdir/cgroup/nameMkdir/cgroup/cpu_and_mem
Mount this mount point to one or more subsystems
Mount-t Cgroup-o Subsystems Name/cgroup/nameMount-t
Hi, this is Zorro. This is my Weibo address, I will not regularly update the article here, if you are interested, can come to watch me yo.In addition, my other contact information:Email: [email protected]QQ: 30007147This document PDFBefore we talk about the memory limit of cgroup, we need to explain it first:Linux Memory Management Fundamentals free CommandFrom any point of view, the memory management of Linux is a piece of trouble, of course, we can
CPU subsystem
The most common parameter of the CPU subsystem is CPU. Shares. We can trace the read and write operations on this parameter through the cgroup Learning (3)-pseudo file table.Through systemtap, we can see the read BT :( cat CPU. shares)
2327 (cat) cpu_shares_read_u64 call trace: 0xffffffff8104d0a0 : cpu_shares_read_u64+0x0/0x20[kernel] 0xffffffff810be3aa :cgroup_file_read+0xaa/0x100 [kernel] 0xffffffff811786a5 : vfs_read+0xb5/0x1a0[kernel
The use of the Linux Cgroup Blkio subsystem.Two IO Isolation strategies supported by the Blkio subsystem.1. (Completely Fair Queuing complete Fair queue) Cfq IO scheduling policy, support the allocation of time slices of IO processing by weight, so as to achieve the purpose of direct scheduling and limitation of IO in each resource group, the weight value range of 100-1000.Configured with the following two files.blkio.weight 默认值blkio.we
Attach task
This process corresponds to the process of ECHO 512> tasks operated by the above instance. The essence of this process is to write the tasks file in cgroup first, establish the relationship between the new css_set of the process and all the cgroups that manage it. Then, attach the process based on the attach function of each subsystem. Here we will first introduce the first process and the second process in each subsystem. First look at BT
Yesterday there was a need to have a bandwidth limit on a process, learning CGROUP+TCThe approximate process is as followsFirst, TC.TC the approximate process is as follows: Root is qdisc---category that is, root there will be a lot of classification we call him class, which defines the rules, that is, the bandwidth limit of how much----filter which is used to specify which categoryCgroupUnderstanding as a container, doing system resource control
First, Cgroup Introduction:CGroup is the abbreviation for Control Groups, which is a mechanism provided by the Linux kernel to restrict, record, and isolate the material resources (such as CPU memory I/O) used by process groups (processes Groups). 2007 entered the Linux 2.6.24 kernel, CGroups is not a new creation, it will process management from Cpuset, the author is Google's Paul menage. CGroups is also the resource management tool that LXC uses to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.