Bug 667623 - Bad example in chapter 2.1.1
Summary: Bad example in chapter 2.1.1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Resource_Management_Guide
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Martin Prpič
QA Contact: ecs-bugs
URL:
Whiteboard:
: 682002 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-06 09:33 UTC by Jan Safranek
Modified: 2011-05-25 12:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-25 12:06:31 UTC


Attachments (Terms of Use)

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. ***


Note You need to log in before you can comment on or make changes to this bug.