[CentOS-virt] How does KVM handle multiple cores?

MargoAndTodd margoandtodd at gmail.com
Wed Nov 10 23:09:29 EST 2010

On 11/10/2010 07:59 PM, compdoc wrote:
> I can't say if KVM will see 6 or 12 cores as I don't run the same hardware.
> It's easy enough to install centos and find out.
> When you create a virtual machine in KVM, you assign virtual cpus to the
> guest - from 1, to as many as you think the guest will need.
> For performance reasons, I personally think it's better to keep the total
> number of virtual cpus in all of your guests close to the number of real
> cpus. But since most computers are idle 99% of the time, you have a lot of
> room for experiment...


I only have two cores and no virtualization on this machine

Four cores works (2 more than I actually have)
# qemu-kvm -smp 4 -m 768 -k en-us -net nic,vlan=0.5 VB-ReactOS.img

But 5 and 6 whines
# qemu-kvm -smp 5 -m 768 -k en-us -net nic,vlan=0.5 VB-ReactOS.img
kvm_create_vcpu: Invalid argument
Segmentation fault

So, I can not tell.

My big concern here is that if I tell it 4 cores on my customer's
x5650 (6 hardware cores), I will actually get 4 hyperthreaded cores
for a total of 2 actual cores.

My experience with Virtual Box tells me to save some cores for the host.

Here is a heads up: if running a Windows guest, make sure you only
use an even number of cores.  M$ freaks out at an odd number of cores,
especially m$sql server.


More information about the CentOS-virt mailing list