Red Hat Enterprise Linux 6.5

Resource Management Guide

Managing system resources on Red Hat Enterprise Linux 6

Edition 4

Martin Prpič

Red Hat Engineering Content Services

Rüdiger Landmann

Red Hat Engineering Content Services

Douglas Silas

Red Hat Engineering Content Services

Legal Notice

Copyright © 2013 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.

Abstract

Managing system resources on Red Hat Enterprise Linux 6.
Preface
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
2.2. We Need Feedback!
1. Introduction to Control Groups (Cgroups)
1.1. How Control Groups Are Organized
1.2. Relationships Between Subsystems, Hierarchies, Control Groups and Tasks
1.3. Implications for Resource Management
2. Using Control Groups
2.1. The cgconfig Service
2.1.1. The /etc/cgconfig.conf File
2.2. Creating a Hierarchy and Attaching Subsystems
2.3. Attaching Subsystems to, and Detaching Them From, an Existing Hierarchy
2.4. Unmounting a Hierarchy
2.5. Creating Control Groups
2.6. Removing Control Groups
2.7. Setting Parameters
2.8. Moving a Process to a Control Group
2.8.1. The cgred Service
2.9. Starting a Process in a Control Group
2.9.1. Starting a Service in a Control Group
2.9.2. Process Behavior in the Root Control Group
2.10. Generating the /etc/cgconfig.conf File
2.10.1. Blacklisting Parameters
2.10.2. Whitelisting Parameters
2.11. Obtaining Information About Control Groups
2.11.1. Finding a Process
2.11.2. Finding a Subsystem
2.11.3. Finding Hierarchies
2.11.4. Finding Control Groups
2.11.5. Displaying Parameters of Control Groups
2.12. Unloading Control Groups
2.13. Using the Notification API
2.14. Additional Resources
3. Subsystems and Tunable Parameters
3.1. blkio
3.1.1. Proportional Weight Division Tunable Parameters
3.1.2. I/O Throttling Tunable Parameters
3.1.3. blkio Common Tunable Parameters
3.1.4. Example Usage
3.2. cpu
3.2.1. CFS Tunable Parameters
3.2.2. RT Tunable Parameters
3.2.3. Example Usage
3.3. cpuacct
3.4. cpuset
3.5. devices
3.6. freezer
3.7. memory
3.7.1. Example Usage
3.8. net_cls
3.9. net_prio
3.10. ns
3.11. perf_event
3.12. Common Tunable Parameters
3.13. Additional Resources
4. Control Group Application Examples
4.1. Prioritizing Database I/O
4.2. Prioritizing Network Traffic
4.3. Per-group Division of CPU and Memory Resources
A. Revision History