On Thu, Feb 26, 2009 at 10:40:54PM +0000, David Lutterkort wrote:
On Thu, 2009-02-26 at 16:36 +0000, Daniel P. Berrange wrote:
> Recent Linux kernels have a new concept of 'CGroups' which is a way to
> group tasks on the system and apply policy to them as a whole. We already
> use this in the LXC container driver, to control total memory usage of
> things runing within a container.
>
> This patch series is a proof of concept to make use of CGroups in the
> QEMU driver. The idea is that we have a 3 level cgroup hierarchy
>
> - Top level; contains the libvirtd daemon itself
> - 2nd level: one per libvirt driver, but dos not contain any
> processes.
> - 3rd level: one per guest VM. Contains the QEMU process
Why the separate group for the driver ? Do you see partitioning of
resources by driver as an important requirement ?
It is mostly a namespacing issue. The per-VM group names on the filesystem
are based off the VM name. VM names are only unique within scope of a
driver. Since both LXC and QEMU drivers use CGroups, we need to make
sure they have separate namespace in cgroups. A per-driver cgroup solves
this nicely.
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|