MANAGE SYSTEM RESOURCES USING RED HAT ENTERPRISE LINUX 6 CONTROL GROUPS
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
cGroups: CPU Controller
Proc. IDs – Proc. name 1 – /sbin/init 2 – [kthread] ... 2845 – ../run-mozilla 2862 – ../firefox 2899 - ../npviewer ... 3015 - ../dump ... 3748 - ../dd if=/dev..
●
●
●
● ● ●
Configuration Utilities & Library Improvements
cGroups: Network Controller
1 CPUSet group#1 2
3
5
7
9
11
13
15
CPUSet group#2
4
6
8
10
12
14
16
cGroups: CPUSet Controller
Proc. IDs – Proc. name CPUSet group#1 1 3 2 4 6 5 8 7 9 11 13 15
50% 25%
10 12 14 16
25% 25%
CPU group2 (1024)
CPU group3 (1024)
cGroups & Infrastructure
●
Controller Group's Infrastructure Controller Types
●
●
CPUSet/CPU Controller Memory Controller Disk I/O Bandwidth Controller Network Bandwidth Controller
cGroups: The Answer to Large System Resource Management
Finance
Sales
IT: Backup
Resource Management
● ● ● ●
Resource isolation at the OS level Give system administrator the controls Partitioning and aggregation Kernel subsystems
●
●
CPUSet/CPU Controller Memory Controller Disk I/O Bandwidth Controller Network Bandwidth Controller
●
●
●
● ● ●
Configuration Utilities & Library Improvements
● ●
●
cpuset.cpus and cpuset.mems E.g., Partitioning a multi-processors system into different CPUSet cGroups & isolate different execution environment applications within these groups
cGroups & Infrastructure
●
Controller Group's Infrastructure Controller Types
●
●
CPUSet/CPU Controller Memory Controller Disk I/O Bandwidth Controller Network Bandwidth Controller
10 12 14 16
CPUSet group#3
CPUSet group#2
25%
1 – /sbin/init 2 – [kthread] ... 2845 – ../run-mozilla 2862 – ../firefox 2899 - ../npviewer ... 3015 - ../dump ... 3748 - ../dd if=/dev..
●
●
SCHED_FIFO and SCHED_RR Each group is given a fixed share of runtime per period. SCHED_OTHER
● ●
●
Each group is given a weight and distribute available capacity proportionally to that
1 CPUSet group#1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
CPUSet group#2
cGroups: CPU Controller
50%
1 3 CPU Set grou 2 4 p#1 5 6 7 8 9 11 13 15 CPUSet group#2 CPU Group1 (2048) Proc. IDs – Proc. name 1 – /sbin/init 2 – [kthread] ... 2845 – ../run-mozilla 2862 – ../firefox 2899 - ../npviewer ... 3015 - ../dump ... 3748 - ../dd if=/dev..
●
●
●
cGroups: Memory Controller
Process IDs 1 – /sbin/init 2 – [kthread] ... 2845 – ../run-mozilla 2862 – ../firefox 2899 - ../npviewer ... 3015 - ../dump ...
cGroups: Use Case #1 (cont.)
Figure 2: After moving the second instance of the database (red) from the Sales team into a separate disk I/O cGroup, the first instance of the database (blue) I/O throughput increased.
3
5
7
9
11
13
15
CPUSet group#2
4
6
8
10
12
14
16
cGroups: CPUSet Controller
Process IDs 1 – /sbin/init 2 – [kthread] ... 2845 – ../run-mozilla 2862 – ../firefox 2899 - ../npviewer ... 3015 - ../dump ...
●
●
●
● ● ●
Configuration Utilities & Library Improvements
cGroups: CPU Controller
●
Control CPU bandwidth usage on a per-task group basis For scheduling class type:
cGroups & Infrastructure
●
Controller Group's Infrastructure Controller Types
●
●
CPUSet/CPU Controller Memory Controller Disk I/O Bandwidth Controller Network Bandwidth Controller
cGroups: CPUSet Controller
●
Assigns a set of logical CPUs & memory nodes to a set of tasks Each CPUSet cGroup can set the sched affinity mask & a memory node affinity mask
●
●
●
● ● ●
Configuration Utilities & Library Improvements
cGroups: CPUSet Controller
1 CPUSet group#1 2
3
5
7
9
11
13
15
4
6
8
wenku.baidu.com
10
12
14
16
cGroups: CPUSet Controller
1 CPUSet group#1 2
●
●
●
● ● ●
Configuration Utilities & Library Improvements
cGroups & Infrastructure
●
Controller Group's Infrastructure Controller Types
●
●
CPUSet/CPU Controller Memory Controller Disk I/O Bandwidth Controller Network Bandwidth Controller
●
●
cGroups: Use Case #1
●
Shaping disk I/O in an database instances environment
Figure 1: A system was running one instance of database (blue) inside a KVM guest for Finance Dept., & the I/O throughput was high. Then another instance of database (red) was started. The I/O throughput decreased.
●
●
●
● ● ●
Configuration Utilities & Library Improvements
cGroups: Memory Controller
●
Keeps track of the amount of memory allocated to each group Enforces the aggregated memory usage of all tasks within that group's pre-configured limit Isolate an application or a group of applications that hog system memory In a virtualized environment to allocate memory to a virtual guest
1G Sales Memory group#1 1G 1G 1G
1G 1G 1G 1G
1G 1G 1G 1G
1G 1G 1G 1G Finance Memory group#2
cGroups & Infrastructure
●
Controller Group's Infrastructure Controller Types
MANAGE SYSTEM RESOURCES USING RED HAT ENTERPRISE LINUX 6 CONTROL GROUPS
Linda Wang Senior Software Eng. Mgr, Kernel Bob Kozdemba Senior Solutions Architect May 6, 2011
cGroups: Disk I/O Controller
●
Provides proportional weight-based disk access to various disk I/O control groups Can be created & weights can be assigned to these cGroups The I/O scheduler will schedule the cGroups in such a way that these groups get disk time in proportion to weights assigned to the groups
cGroups & Infrastructure
●
Controller Group's Infrastructure Controller Types
●
●
CPUSet/CPU Controller Memory Controller Disk I/O Bandwidth Controller Network Bandwidth Controller