Tag Archive for vm

Analyse virtual machine workload to determine optimum slot size

images

Recommendations

  • If you have one VM which is configured with a very high amount of memory, you can either lower its configured memory, or take it out of the cluster and run it on any other standalone ESX host. This will increase the number of slots available with the current hardware
  • Remove any CPU reservations on any VM(s) that are greater than the max speed of the processors in the hosts.
  • If you have just one VM with a really high reservation you can set the following advanced settings to lower the slot size being used during these calculations: das.slotCpuInMHz or das.slotMemInMB. To avoid not being able to power on the VM with high reservations these VM will take up multiple slots. Keep in mind that when you are low on resources this could mean that you are not able to power-on this high reservation VM as resources are fragmented throughout the cluster instead of located on a single host.
  • Create Resource Pools with Reservations to get around fragmented slot sizes which can occur when using Host Failure Tolerates Admission Policy
  • Use das.vmMemoryMinMB <value> This options/value pair overrides the default memory slot size value used for admission control for VMware HA where <value> is the amount of RAM in MB to be used for the calculation if there are no larger memory reservations. By default this value is set to 256MB. This is the minimum amount of memory in MB sufficient for any VM in the cluster to be usable
  • Use das.vmCPUMinMHz <value> This options/value pair overrides the default CPU slot size value used for admission control for VMware HA where <value> is the amount of CPU in MHz to be used for the calculation if there are no larger memory reservations. By default this value is set to 256MHz
  • Set the “Allow Virtual Machines to be powered on even if they violate availability constraints” in the configuration of the cluster. In this case it ignores the above calculation and will try to power on as many VM’s as possible in case of HA failover

Slot Size Example

Here we can see someone has set a reservation of 8GB RAM somewhere

image1

Once the reservation of 8GB is taken off, you can see the Slot size instantly adjust back to a more sensible size

image2

Tune ESXi VM Storage Configuration

tools

Tuning Configuration

  • Use the correct virtual hardware for the VM O/S
  • Use paravirtual hardware for I/O intensive applications
  • LSI Logic SAS for newer O/S’s
  • Size the Guest O/S Queue depth appropriately
  • Make sure Guest O/S partitions are aligned
  • Know what Disk provisioning policies are best. Thick provision lazy zeroed (default), Thick provision eager zeroed and Thin provision.
  • Store swap file on a fast or SSD Datastore

swapfile

  • When deploying a virtual machine, an administrator has a choice between three virtual disk modes. For optimal performance, independent persistent is the best choice. The virtual disk mode can be modified when the VM is powered off.

storage

  • Choose VMFS or RDM Disks to use. RDM Disk generally used by clustering software.

RDM

  • Use Disk Shares to configure more fined grained resource control

vmstroage

  • In some cases large I/O requests issued by applications can be split by the guest storage driver. Changing the VMs registry settings to issue larger block sizes can eliminate this splitting thus enhancing performance. See http://kb.vmware.com/kb/9645697

Why suspend a VM?

Suspending a virtual machine is similar to putting a real computer into the sleep mode. When you suspend a virtual machine, you save its current state (including the state of all applications and processes running in the virtual machine) to a special file on your. When the suspended virtual machine is resumed, it continues operating at the same point the virtual machine was at the time of its suspending.

Suspending your virtual machine may prove efficient if you need to restart your host, but do not want to:

  1. Quit the applications running in the virtual machine
  2. Spend much time on shutting the guest operating system down and then starting it again