Re: Fwd: KVM and cpu limiting

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

 



On Fri, Jul 02, 2010 at 08:38:37PM +0400, Boris Dolgov wrote:
> On Fri, Jul 2, 2010 at 11:57 AM, Srivatsa Vaddagiri <vatsa@xxxxxxxxxx> wrote:
> >> Is it possible to limit cpu usage be VM when using qemu+kvm?
> >
> > Have you checked cpu controller?
> It is very interesting. Looks like it is something, that I need.
> So, limiting qemu process will limit cpu usage for the container?
> I think, i will be able to configure it to provide guaranted cpu to
> containers in that way.

Note that shares control how much cpu bandwidth a VM gets _relative_ to other
active VMs and hence is not a absolute measure of how much CPU capacity is
provided to a particular VM. If the number of VMs deployed on a server 
and their relative priority remains static in general, then shares can be 
used as both "guarantee" and "limit" mechanism.

> But what happens with the VM when qemu process is paused by the
> scheduler? Will this time be counted as idle time for VM's cpu,

No - it should be accounted as "runqueue wait time".

> or it will be added to the state, which was used when qemu process was
> paused?

The runqueue wait time should reflect as "steal" time for the VMs. top command
should show the steal time for a VM (look for 'st'), although I am not 100% sure
whether steal time is reported in case of KVM guests.

> > Why do you want to modify /proc/cpuinfo of VMs?
> Just for information about the limits for the VMs' owners.

Sounds like a cool idea - although not sure whether cpuinfo is the right place.
You can try sending a patch and find out what the community thinks of it!

- vatsa
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux