(write a contingency plan) |
(reformat, use kernel.org git repo link) |
||
Line 65: | Line 65: | ||
== Documentation == | == Documentation == | ||
* kernel documentation: [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;f=Documentation/cgroups <code>Documentation/cgroups/</code>] | |||
* kernel documentation | * <code>libcg</code>: | ||
** [http://libcg.sourceforge.net/ upstream site] | |||
libcg | ** LWN.net article: [http://lwn.net/Articles/271788/ libcg: design and plans] | ||
* | |||
* | |||
== Release Notes == | == Release Notes == |
Revision as of 15:22, 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
- Nils Philippsen
- Ivana Varekova
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
fromscripts/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.
User Experience
Currently, the libcgroups
package has several bugs, these will have to be fixed at first. When that is out of the way, configuration (or even monitoring) tools would reduce the barrier of entry to using control groups on Linux significantly.
Dependencies
Depends on kernel > 2.6.24 and libcgroups
(current version is 0.32.2) which both are in Fedora since F-9.
Contingency Plan
Currently, nothing depends on libcgroup
or the tools which would use it. If things go really wrong, we can always go back to the last working version of libcgroup
.
Documentation
- kernel documentation:
Documentation/cgroups/
libcg
:- upstream site
- LWN.net article: libcg: design and plans