Search This Blog


VMware Disk Performance Best Practices

Thick Provision your Disks with Eager Zeroed

  • Thin provisioning OR even Thick provisioning can result in slower performance as it does not allocate all of the space in the vmdk as usable by default. As you write more data to the disk it will have to expand the file system causing the file system to expand on the fly.
  • Ensure that when creating disks you use: 
    • Eager-Zeroed 
    • Thick Provisioning 
  • This way it will zero out the entire .vmdk and will not hit any performance bumps when the OS starts using more space than initially allocated. 

Here is a link to explain the benefits of thick provisioned eager zeroed disks:

Here is how to convert a thin provisioned disk to thick:

Install vmware-tools

  • vmware-tools basically act as drivers between the virtual guest and the hypervisor layer. 
  • Using a logical(virtualized) disk controller will impact performance as it adds another abstraction layer between the actual physical hardware and the guest OS. 
  • The actual hardware doesn't know how to handle tasks like queueing and cannot easily talk between hardware and guest OS without these drivers. 

Installation Instructions: 

  • Open up vSphere client to the vmhost 
  • Click on the guest 
  • Go to the Inventory menu
    • Virtual Machine
    • Guest 
    • Install/Upgrade VMWare Tools 

mkdir /media/cdrom
mount /dev/cdrom /media/cdrom
cd /tmp
tar -zxf /media/cdrom/VMWareTools(tab complete)

Enable vmware-tools on startup (should already be done but just to make sure)
/sbin/chkconfig vmware-tools on

Either reboot or run the following command
/etc/init.d/vmware-tools start

Use independent-persistent mode when possible
If you absolutely do not require snapshots (which you shouldn't if you are looking for disk performance). Create the disks with the setting Independent Persistent Mode

Steps to enable Independent Persistent Mode 

  • Right click the VM
    • Edit Settings 
    • Click on the hard disk
      • mode
      • independent persistent 
Alternatively, you can select this option as you are creating the vm

Do not use snapshots

  • Using snapshots will decrease disk performance in the same way that thin provisioning does. Except the effect is multiplied because you are writing to a snapshot file thinly as well as the current running OS. 
  • As a general rule, just do not create them unless absolutely necessary. If you need them temporarily, create them, then merge them when you are done to regain that disk performance. 

Instructions to merge snapshots

  1. Click on the VM in the left panel 
  2. Click the snapshot manager button on the top toolbar (looks like a clock with a wrench) 
  3. Delete the snapshot. It will automatically merge the changes into a single vmdk flat file. 
  4. Done

No comments:

Post a Comment