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:
- 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: http://www.vmware.com/pdf/vsp_4_thinprov_perf.pdf
Here is how to convert a thin provisioned disk to thick:
- 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.
- Open up vSphere client to the vmhost
- Click on the guest
- Go to the Inventory menu
- Virtual Machine
- Install/Upgrade VMWare Tools
mount /dev/cdrom /media/cdrom
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
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
- independent persistent
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
- Click on the VM in the left panel
- Click the snapshot manager button on the top toolbar (looks like a clock with a wrench)
- Delete the snapshot. It will automatically merge the changes into a single vmdk flat file.