[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu



On Thu, Jul 21, 2011 at 11:09:26AM +0100, Daniel P. Berrange wrote:
> On Thu, Jul 21, 2011 at 10:08:03AM +0800, Wen Congyang wrote:
> > Introduce the function virCgroupForVcpu() to create sub directory for each vcpu.
> 
> I'm far from convinced that this is a good idea. Setting policies on
> individual VCPUs is giving the host admin a misleading illusion of
> control over individual guest VCPUs. The problem is that QEMU has
> many non-VCPU threads which consume non-trivial CPU time. CPU time
> generated by a CPU in the guest, does not neccessarily map to a VCPU
> thread in the host, but could instead go to a I/O thread or a display
> thread, etc.

In fact the behaviour is worse than I describe, because the hard limit
setting is not applied at the VM cgroup at all, so if the VM is doing
heavy I/O, then no CPU limits are being applied to QEMU's I/O threads
at all.

The existing cpu_shares tunable is being set for the VM as a whole, so
I think it is really confusing to have the period/quota only affecting
VCPU threads and not the VM as a whole.

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 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]