Multi-core Hypervisor

Multi-core Hypervisor

A VMM provides a VMCS for each VM. How does the VMM assign system resources for each VM? For example, in a multi-core, not multi-processor, environment, how can I force a VM to execute only on a specific logical processor on a specific core? How can I distribute execution of the VM over multiple cores?

3 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

The answer will depend largely on the specific hypervisor you use.

In general all VMMs have a scheduler which distribute the virtual CPUs (VCPU)assigned to VMs to the Physical (or Logical) CPUs (PCPU)available from the hardware.

You can choose to "pin" a VCPU to a given PCPU manually if you so desire. In the case of VMware ESX, this isn't a strict pinning but more of a scheduling affinity: A strongly worded suggestion to the VMM scheduler not to move your VM's VCPUS.

In Xen there's tutorial hereon how to pin

In VMWare you do this from vSphereby selecting "Edit Settings" on your VMand going to the "Resources" tab and the "Advanced CPU" options. There you enter in the "Scheduling Affinity" box the PCPUs you want to affinitize your VCPU to.

btw, multi-core and multi-processor from the software's perspective often mean the same thing (at the hardware level there is certainly a distinction). For example on a recent single socketNehalem quadclassprocessor, the software will see 4 "CPUs" numbered 0 to 3. A Dual socket machin based on the same Nehalem quad processor will see 8 "CPUs" numbered 0 to 7.

If you enable SMT (i.e. Hardware threading) the software will see 8 and 16 "processors" respectively, numbering them 0-7 and 0-15.

I am using TVMM as a base hypervisor. The intel manuals do not mention a vcpu, what exactly are you refering to here? Is it the CPUID that is associated with each logical processor? How do I find the list of all CPUIDs that are available on a quadcore i7?

发表评论

登录添加评论。还不是成员?立即加入