Submitted by mcordas on Fri, 10/22/2010 - 17:24 Pro Licensee
Here's the situation : We have a Cloudmin system with several KVM VMs, Each one have différent disk and RAM ressources. One of them is more demanding on CPU power.
Is it possible to attribute a différent number of "virtual cpu cores" to different VM's via Cloudmin ?
Status:
Active
Comments
Submitted by JamieCameron on Fri, 10/22/2010 - 17:27 Comment #1
As far as I know, no .. KVM has no built-in way of limiting the CPU use of a VM, or limiting it to some cores.
Xen can do this though.
Submitted by mcordas on Fri, 10/22/2010 - 17:32 Pro Licensee Comment #2
Ok. Thank's for the answer.
Submitted by JamieCameron on Fri, 10/22/2010 - 17:48 Comment #3
Submitted by mcordas on Tue, 10/26/2010 - 05:52 Pro Licensee Comment #4
After some research, I found that with libvirt, it was possible to create SMP KVM VMs, with 2 or more virtual cores.
From qemu-kvm doc :
-smp n Simulate an SMP system with n CPUs
So my question is : is possible to start a VM with -smp 2 (or more) within Cloudmin, instead of just 1 virtual core ?
Submitted by mcordas on Tue, 10/26/2010 - 07:04 Pro Licensee Comment #5
Submitted by JamieCameron on Tue, 10/26/2010 - 11:39 Comment #6
That could certainly be added ... however, it seems like it would do the opposite of what you want, which is to limit CPU use. Giving a KVM instance multiple cores would allow it to consume even more CPU on the host ..
Submitted by mcordas on Tue, 10/26/2010 - 12:18 Pro Licensee Comment #7
Yes that's true.
In fact, one of our VM's is heavily loaded, while one another is lightly loaded.
Since the Host has CPU ressources free (load is ca. 1.20 on a quad-core), we could give some air to the first VM with 1 more virtual core.
So, you think I could just add "-smp 2" to this VM's Coudmin config file ?
Submitted by JamieCameron on Tue, 10/26/2010 - 12:38 Comment #8
You can configure Cloudmin to add this flag, as follows :
cloudmin list-systems --host yourkvminstance --id-only
/etc/webmin/servers/XXXX.serv
, where XXXX is the unique ID.kvm_args=-smp 2
at the end.Submitted by mcordas on Tue, 10/26/2010 - 13:22 Pro Licensee Comment #9
Ok, thanks a lot for the confirmation.
Regards.