Zvi Dubitzky
2011-Mar-16 18:04 UTC
[libvirt-users] using more than 1 core by a virtual machine
My virtual machine xml file has <vcpu>2</vcpu> clause while the host has 2 physical cpus (cores). Is this enough to cause a VM running 2 endless loop threads to use the 2 cores ? In my case the VM running reports (cat /roc/cpuinfo) that it has 2 vcpus but it uses only 1 core (at a time) because the 'top' at the host shows 100%cpu (out of total 200%) used by the endless loop application Also virsh vcpuinfo <vm> shows only 1 CPU and 1 vcpu any idea ? thanks Zvi Dubitzky Email:dubi at il.ibm.com
Osier Yang
2011-Mar-21 08:27 UTC
[libvirt-users] using more than 1 core by a virtual machine
? 2011?03?17? 02:04, Zvi Dubitzky ??:> My virtual machine xml file has<vcpu>2</vcpu> clause while the host has > 2 physical cpus (cores). > Is this enough to cause a VM running 2 endless loop threads to use the 2 > cores ? > In my case the VM running reports (cat /roc/cpuinfo) that it has 2 vcpus > but it uses only 1 core (at a time) because > the 'top' at the host shows 100%cpu (out of total 200%) used by the > endless loop application > Also virsh vcpuinfo<vm> shows only 1 CPU and 1 vcpuIs it really only 1 vcpu is showed? it should be two, that's strange if you specified two vcpus, but only 1 is showed. and by default, if you don't specify "cpuset" in <vcpu>, it uses all the physical cpus, if I'm right, so you should be able to see something like: CPU Affinity: yy Could you try specify "cpuset" explicitly like: <vcpu cpuset="0,1">2</vcpu> And see what it happens? Regards Osier