From Fedora Project Wiki
(Some clarifications, wording & grammar fixes)
Line 27: Line 27:


== How To Test ==
== How To Test ==
For now there is necessary to have a kernel which includes cgroups feature (<code>Documentation/cgroups.txt</code>) and libcgroups package
For now it is necessary to have a kernel with cgroups support (<code>Documentation/cgroups.txt</code>) and the <code>libcgroups</code> package.


the procedure how to start cgconfig service:
Start the <code>cgconfig</code> service:
* create <code>/etc/cgconfig.conf</code> configuration file (the example is in /samples section) (initscript from 0.32.2 is able to create the mount point itself and to mount the filesystem to)
* Create the <code>/etc/cgconfig.conf</code> configuration file (the example is in the /samples section, the initscript from version 0.32.2 is able to create the mount point itself and mount the filesystem to it).
* for each mount point create the relevant directory and mount it (type of mount is <code>cgroup</code> so line <code>"cgroup                  <mount-point>                cgroup  defaults        0 0"</code> or command <code>mount -t cgroup cgroup <mount-point></code>) (see <code>scripts/doc/howto.txt</code> - there is mentioned the script could mount it but I can't reproduce it - seems to be initscript problem)
* For each mount point create the relevant directory and mount it. The filesystem type is <code>cgroup</code>, so an fstab line would look like this:
* then you can start the service (stop of this service umount the directory and remove it)
<pre>
cgroup                  <mount-point>                cgroup  defaults        0 0
</pre>
or you can mount it manually with this command:
<pre>
mount -t cgroup cgroup <mount-point>
</pre>
(see <code>scripts/doc/howto.txt</code> - this mentions that the script would mount it but this doesn't seem to work, probably a problem in the cgroup init script)
* Then you can start the service:
<code>/sbin/service cgconfig start</code>


=== Problems (in 0.32.2) ===
=== Problems (in 0.32.2) ===
* test example of <code>cgconfig.conf</code> from <code>scripts/doc/howto.txt</code> does not work
* Test example of <code>cgconfig.conf</code> from <code>scripts/doc/howto.txt</code> does not work.
* if I change /etc/cgconfig.conf when cgconfig is running and try to restart it - the result is bunch of error messages
* Changing <code>/etc/cgconfig.conf</code> while cgconfig is running leads to a bunch of error messages if you try to restart it.

Revision as of 11:44, 20 January 2009

Feature Name

ControlGroups

Summary

Improve the existing tools where necessary and feasible and/or to create new ones e.g. to create or modify persistent cgroups configuration (using libcgroups package).

Owner

Current status

  • Targeted release:
  • Last updated: 2009-01-19
  • Percentage of completion: 0%

Detailed Description

Since kernel 2.6.24, Linux has so called control groups as a means to partition available resources between running processes. Libcgroups makes that functionality available to programmers and contains two tools, cgexec and cgclassify, to start processes in a control group or move existing processes from one control group to another.

Our goals are to improve the existing tools where necessary and feasible and/or to create new ones e.g. to create or modify persistent cgroups configuration. At the beginning the focus will be on command line tools, but we'll keep in mind that in the long term we'll likely want to have graphical tools. These would offer similar functionality and we should try to make sure that any non-UI code written is usable from both kinds of frontends.

Benefit to Fedora

Libcgroups handles the new kernel features which are able to restrict the sources for tasks. This project should help the user to make the best of this feature.

Scope

currently in process

How To Test

For now it is necessary to have a kernel with cgroups support (Documentation/cgroups.txt) and the libcgroups package.

Start the cgconfig service:

  • Create the /etc/cgconfig.conf configuration file (the example is in the /samples section, the initscript from version 0.32.2 is able to create the mount point itself and mount the filesystem to it).
  • For each mount point create the relevant directory and mount it. The filesystem type is cgroup, so an fstab line would look like this:
cgroup                   <mount-point>                cgroup  defaults        0 0

or you can mount it manually with this command:

mount -t cgroup cgroup <mount-point>

(see scripts/doc/howto.txt - this mentions that the script would mount it but this doesn't seem to work, probably a problem in the cgroup init script)

  • Then you can start the service:

/sbin/service cgconfig start

Problems (in 0.32.2)

  • Test example of cgconfig.conf from scripts/doc/howto.txt does not work.
  • Changing /etc/cgconfig.conf while cgconfig is running leads to a bunch of error messages if you try to restart it.