kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Limit the CPU usage of KVM
@ 2009-08-17  5:09 Yu Jiang (yujia)
  2009-08-17  7:25 ` Dor Laor
  0 siblings, 1 reply; 6+ messages in thread
From: Yu Jiang (yujia) @ 2009-08-17  5:09 UTC (permalink / raw)
  To: kvm

Hi KVM experts,
 
Our user case needs to run KVM and application on host together. To
reserve some CPU resource for application, we want to limit the CPU
usage of KVM. Without KVM CPU usage limitation, the idle CPU of host OS
becomes 0% in peak time.
 
I have searched this topic on internet, but didn't find much comments.
 
One possible solution could be managing KVM process as regular process
on host OS, and use tool like http://cpulimit.sourceforge.net/ to limit
maximum CPU usage of VM. Basically, the cpulimit tool use SIGSTP and
SIGCONT signals to stop and resume the execution of KVM process. It
works fine for us at moment. But, I feel there may be some risk to do
this, because the signal will cause whole process of KVM paused(not only
vcpu thread). Do you think it's safe to use cpulimit kinds of tool to
SIGSTP/SIGCONT kvm?
 
Another possible solution was:
Enhance QEMU user space to monitor the CPU usage of itself, and use
existing way(pause_all_vcpus?) to pause vcpu thread of KVM in case KVM
reaches CPU usage limitation. Is this solution possible?
 
Any idea?
 
 
Thanks,
Yu
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-08-18 10:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-17  5:09 Limit the CPU usage of KVM Yu Jiang (yujia)
2009-08-17  7:25 ` Dor Laor
2009-08-17  8:04   ` Yu Jiang (yujia)
2009-08-17  8:14     ` Dor Laor
2009-08-18  8:54       ` Yu Jiang (yujia)
2009-08-18 10:07         ` Dor Laor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).