- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page