a virtual machine has three user-defined settings that affect CPU resource allocation:
CPU limit: defines the maximum amountof CPU measured in MHZ that this virtual machine is allowed
CPU reservation: defines the amount of CPU reserved for this virtual machine when CPU contention occurs .If the virtual machine does not use the total amount of its CPU reservation then the unused protion is available for use by other virtual machines until the the virtual manchine needs it
CPU shares : each virtual machine is granted a number of CPU shares.the more shares a VM has the more often it gets a timeslice of a CPU when there is no CPU idle time .
a virtual machine has four user-defined memory settings that affect its memory resource allcocation:
Available memory : is the amount of memory given to the virtual machine at the time it was created.it is the maximum amount of memory the virtual machine supplies to the guest OS .the vm cant address a larger memory area than this size of available memory,unless it is powered down and more memory is configured for the vm
memory limit :defines the maximum amount of virtual machine memory thant can reside in RAM ,not to exceed available memory .By default,available memory and memory limit are initially the same value.memory reservation is the amount of RAM reserved for that virtual machine memory.
memory reservation :
unused memory reservation
like CPU reservation are not wasted.if a vm does not consume all of the RAM that is reserved for it,other vms can use that RAM.but once the VM uses that RAM ,no portion of the VM'S reservation will erver be ballooned or swapped .even if that RAM is completely idle.transparent page sharing,however,is not prevented from reclaiming reserved memory.
memory shares: are separate from CPU shares but applied in the same way. A virtual machine 's memory shares controls how often it wins competition for RAM when RAM is scarce.virtual machines that lose must wait until RAM becomes available.
vmkernel allocates a per-vm swap file to cover each vm's range between available memory and reservation memory.
本文出自 “Fighting” 博客,谢绝转载!