于 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 vcpu
Is 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