Best Practices for Integrity Virtual Machines

6/19
Virtual Machine Definition
Create Virtual Machines Conservatively
Once you begin to define a virtual machine, it is very tempting to create it as large as possible – it’s
all virtual hardware, right? While it is true that a VM uses virtual hardware, there are some
repercussions to creating it with more virtual hardware than it needs.
Uniprocessor Virtual Machines are More Efficient than Virtual SMPs
Generally speaking, uni-processor systems are more efficient than multi-processor systems.
Scheduling, memory access, and resource contention issues are all easier if only one processor is
involved. The same is true for virtual machines.
Moreover, each virtual processor is allocated some minimum fraction of a physical processor’s
resources. So a VM with four virtual processors requires four times the processor resources that a VM
with a single processor requires. Each of virtual processor from a virtual SMP must be allocated
resources from separate physical processors two virtual processors from the same virtual machine
cannot be scheduled on the same physical processor. The CPU resources of a VM Host may be
prematurely exhausted by the definition of a virtual SMP.
For example, suppose the VM Host has four physical processors and a VM with 4 virtual processors,
each with an entitlement of 25%. This would leave one to believe that 3 uni-processor VMs with
100% CPU entitlement can also be created since the remaining CPU resources on the VM Host is a
total of 300%. Not true. The resource guarantee mechanism in Integrity VM requires that 25% of
four physical CPUs be available for the original virtual SMP (with four virtual CPUs). That leaves only
75% of three physical CPUs available for virtual processors. A virtual CPU may be scheduled on
exactly one physical CPU, so the largest entitlement any virtual CPU can receive is 75%. So, the
largest entitlement those 3 uni-processor VMs can be defined with is 75%.
Use Physical Memory Wisely
The more memory any system is configured with, the more likely it is to incur page faults and other
memory management interrupts. The same applies to virtual machines. Moreover, the memory used
by a VM cannot be made available to other running VMs on that same VM Host. For both of these
reasons, allocate memory to VMs conservatively.