Bug 667623

Summary: Bad example in chapter 2.1.1
Product: Red Hat Enterprise Linux 6 Reporter: Jan Safranek <jsafrane>
Component: doc-Resource_Management_GuideAssignee: Martin Prpič <mprpic>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: jskeoch, steve, varekova
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-25 12:06:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Safranek 2011-01-06 09:33:22 UTC
Description of problem:
I've tried the example in chapter 2.1.1 of Resource Management Guide, Edition 1.0 and both the cgconfig.conf sample and sequence of shell commands are wrong.

cgconfig.conf problem:
You create two groups: daemons and daemons/sql. The daemons/sql is created explicitly as written in the config file. But the cgconfig service must create also daemons group - on the pseudofilesystem, 'sql' is just subdirectory of 'daemons', so 'daemons' must be created. Since the daemons group does not have set any cpuset.cpus, it is *not* possible to set cpuset.cpus in daemons/sql (because cpuset.cpus in daemons/sql must be subset of parent's cpuset.cpus and it is not set). Maybe cpuset controller is bad example, you won't get into this troubles if you use cpu controller instead (and cpu.shares as parameter - it's always set by kernel when a new group is created, unlike cpuset.cpus).

shell sequence problem:
You mount cpuset to /cgroup/cpuset, but one paragraph below you use 'mkdir -p /cgroup/cpu/daemons/sql'. It should be/cgroup/*cpuset*/daemons/sql.

And the same problem as above arises, you mkdir -p /cgroup/cpu/daemons/sql, which creates 'daemons' group, but you don't set its cpuset.cpus, so you can't set it in any of its subgroups, 'echo 0 > /$TMP/cgroup/cpuset/daemons/sql/cpuset.cpus' fails with echo: write error: Permission denied,

Comment 5 Martin Prpič 2011-03-07 08:28:59 UTC
*** Bug 682002 has been marked as a duplicate of this bug. ***