From: "Daniel P. Berrange" <berrange@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: fedora-devel-list@redhat.com, mclasen@redhat.co,
cg-manager-developers@lists.fedorahosted.org,
Linda Wang <lwang@redhat.com>,
duffy@redhat.com, containers@lists.osdl.org
Subject: Re: new cg-manager gui tool for managin cgroups
Date: Fri, 22 Jul 2011 11:07:18 +0100 [thread overview]
Message-ID: <20110722100718.GC2519@redhat.com> (raw)
In-Reply-To: <20110721205850.GH12373@redhat.com>
On Thu, Jul 21, 2011 at 04:58:50PM -0400, Vivek Goyal wrote:
> On Thu, Jul 21, 2011 at 06:17:03PM +0200, Lennart Poettering wrote:
> > On Thu, 21.07.11 15:52, Daniel P. Berrange (berrange@redhat.com) wrote:
> >
> > > > I think its a question of do we want to make users go to a bunch of
> > > > different front end tools, which don't communicate with each other to
> > > > configure the system? I think it makes sense to have libvirt or
> > > > virt-manager and systemd front-end be able to configure cgroups, but I
> > > > think it would be also nice if they could know when the step on each
> > > > other. I think it would also be nice if there was a way to help better
> > > > understand how the various system components are making use of cgroups
> > > > and interacting. I liked to see an integrated desktop approach - not one
> > > > where separate components aren't communicating with each other.
> > >
> > > It is already possible for different applications to use cgroups
> > > without stepping on each other, and without requiring every app
> > > to communicate with each other.
> > >
> > > As an example, when it starts libvirt will look at what cgroup
> > > it has been placed in, and create the VM cgroups below this point.
> > > So systemd can put libvirtd in an arbitrary location and set an
> > > overall limits for the virtualization service, and it will cap
> > > all VMs. No direct communication between systemd & libvirt is
> > > required.
> >
> > systemd (when run as the user) does exactly the same thing btw. It will
> > discover the group it is urnning in, and will create all its groups
> > beneath that.
> >
> > In fact, right now the cgroup hierarchy is not virtualized. To make sure
> > systemd works fine in a container we employ the very same logic here: if
> > the container manager started systemd in specific cgroup, then system
> > will do all its stuff below that, even if it is PID 1.
>
> How does the cgroup hierarchy look like in case of containers? I thought
> libvirtd will do all container management and libvirtd is one of the services
> started by systemd.
If we assume systemd placed libvirtd into $LIBVIRT_ROOT, then libvirtd
will create the following hierarchy below that point:
$LIBVIRT_ROOT (Where libvirtd lives)
|
+- libvirt (Root for all virtual machines & containers)
|
+- lxc (Root for all LXC containers)
| |
| +- c1 (Root for container with name c1)
| +- c2 (Root for container with name c2)
| +- c3 ...
| +- ...
|
+- qemu (Root for all QEMU virtual machines)
|
+- v1 (Root for virtual machine with name v1)
+- v2 (Root for virtual machine with name v2)
+- v3 ...
+- ...
In the future we might introduce the concept of virtual machine groups
into the API, at which point we might also have separate cgroups to
match those VM groups. That is still TBD.
Primarily the libvirt API is providing you control over the 3rd level
in this hierarchy, eg the individual VM groups. The other levels in
the heirarchy are primarily there so that we can ensure a unique namespace
because we only validate VM name uniqueness within a driver. ie LXC can
have a container called 'demo' and so can QEMU at the same time.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
next prev parent reply other threads:[~2011-07-22 10:07 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 19:20 new cg-manager gui tool for managin cgroups Jason Baron
2011-07-20 20:28 ` Lennart Poettering
2011-07-20 20:42 ` Vivek Goyal
2011-07-20 21:07 ` Lennart Poettering
2011-07-20 21:26 ` Vivek Goyal
2011-07-20 21:41 ` Lennart Poettering
2011-07-20 20:59 ` Vivek Goyal
2011-07-20 21:11 ` Lennart Poettering
2011-07-21 14:20 ` Jason Baron
2011-07-21 15:08 ` Vivek Goyal
2011-07-21 16:11 ` Lennart Poettering
2011-07-21 23:08 ` Karel Zak
2011-07-22 0:32 ` Lennart Poettering
2011-07-22 10:13 ` Karel Zak
[not found] ` <20110721142053.GA2454-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-07-21 17:23 ` Tomas Mraz
[not found] ` <1311268987.6273.18.camel-ToA8MW0H8sPg+ylLNZCgDw@public.gmane.org>
2011-07-21 17:55 ` Lennart Poettering
2011-07-22 1:38 ` Ben Boeckel
2011-07-20 23:01 ` Matthias Clasen
2011-07-21 10:03 ` Daniel P. Berrange
2011-07-21 14:36 ` Jason Baron
[not found] ` <20110721143622.GB2454-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-07-21 14:52 ` Daniel P. Berrange
2011-07-21 15:28 ` Vivek Goyal
2011-07-21 15:36 ` Daniel P. Berrange
[not found] ` <20110721153620.GO17632-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-07-21 15:53 ` Lennart Poettering
2011-07-21 20:15 ` Jason Baron
2011-07-21 20:32 ` Vivek Goyal
2011-07-22 10:01 ` Daniel P. Berrange
[not found] ` <20110721152845.GD12373-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-07-21 16:36 ` Lennart Poettering
2011-08-02 14:04 ` Vivek Goyal
2011-07-21 16:17 ` Lennart Poettering
2011-07-21 20:58 ` Vivek Goyal
2011-07-22 10:07 ` Daniel P. Berrange [this message]
[not found] ` <20110720192029.GD2482-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-07-21 15:30 ` Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110722100718.GC2519@redhat.com \
--to=berrange@redhat.com \
--cc=cg-manager-developers@lists.fedorahosted.org \
--cc=containers@lists.osdl.org \
--cc=devel@lists.fedoraproject.org \
--cc=duffy@redhat.com \
--cc=fedora-devel-list@redhat.com \
--cc=lwang@redhat.com \
--cc=mclasen@redhat.co \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.