Quick Bites:

  • The blog discusses the complete comparison between VMware Virtual Disk Thick and Thin Provisioning
  • It explains the concept of disk provisioning in VMware, covering types of virtual hard disk provisioning, differences between thick and thin virtual disks, and guidance on how to provision and manage virtual disks
  • The article also highlights best practices for VMware disk provisioning and provides a comparison of thin, thick lazy zeroed, and thick eager zeroed disks

Table of Contents

  1. What is disk provisioning in VMware
  2. Thin Provisioned Disks
  3. Thick Lazy Zeroed
  4. Thick Eager Zeroed
  5. Difference between Thick and Thin virtual disks
  6. Difference between Thick Provisioned Eager Zeroed and Thick Provisioned Lazy Zeroed
  7. How to provision virtual disks
  8. Manage virtual disks
  9. Converting Thick to Thin
  10. Converting Thin to Thick
  11. VMware Disk Provisioning Best Practices
  12. Comparison of Thin, Thick Lazy Zeroed & Thick Eager Zeroed

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

What is disk provisioning in VMware?

When you create or provision a VMware Virtual Machine, Virtual Machine data is stored inside a virtual hard disk. It is a virtual construct representing a physical disk. i.e, Virtual hard drive files are attached normally to virtual machines (VMs) and do function as system or data drives for the VM.

Within VMware vSphere there a two primary types of virtual hard disks: thin-provisioned disks and thick-provisioned disks.

Thick provisioned disks are available in two allocation models: thick lazy zeroed and thick eager zeroed.

Download Banner

In this blog, we’ll look at:

  • Types of virtual hard disk provisioning
  • Difference between each method
  • Guidance on how to design & implement virtual disk provisioning

Thin Provisioned Disks

Thin provisioning can be done on the virtual disk level (so per disk thin provisioning) or you at the storage array level.

It allows you to provision a disk without fully allocating all the necessary underlying physical storage. New storage blocks are allocated and zeroed on the fly, as the data is written by the guest.

When you provision a 100GB thin provisioned hard disk and you store 1GB of data on it, you will physically consume just the 1GB. This allows for over-provisioning of storage in which you provision more virtual storage than there is real physical capacity available.

This can be very efficient but physical storage consumption needs to be closely monitored to prevent the physical storage array from running out of disk space.

Advantages

  • Fastest creation time
  • Allows for over-provisioning of storage

Disadvantages

  • Highest performance penalty on first write (block needs to be allocated and zeroed)
  • Storage capacity management needs to be in place to stay

Thick Lazy Zeroed

As opposed to thin-provisioned disks, thick provisioned disks allocate all the physical disk space on the creation of the virtual hard disk.

A 100GB virtual disk will consume 100GB of physical storage. Lazy zeroed disks do not wipe the allocated storage clean beforehand. With each first write, the storage block first needs to be zeroed. This adds some storage latency because there is additional I/O required.

Advantages

  • Fast creation time
  • All space is allocated upfront

Disadvantages

  • Performance penalty on first write (block needs to be zeroed)
  • Does not allow for over-provisioning of storage

Thick Eager Zeroed

Thick eager zeroed disks also allocate all the physical disk space and zero out all the storage blocks beforehand.

This disk type offers the best possible storage performance but is more inefficient and takes longer to provision.

Advantages

  • Highest performance / No performance penalty on first write creation time
  • All space is allocated upfront and all blocks are zeroed in advance
  • Most secure option (all blocks are zeroed in advance)

Disadvantages

  • Longest creation time
  • Does not allow for over-provisioning of storage

Difference between Thick and Thin virtual disks

VMware Virtual Disk Thick vs Thin Provisioning

Example: Create and allocate 40GB of hard disk space.

If you provide thick provisioning to any VM, you first need to estimate how much of storage space for the virtual machine will need for its entire life cycle. Then you provide a fixed amount of storage space to its virtual disk in advance. Since thick disks will immediately occupy the entire provisioned space ie, entire 40GB.

However, thin disk provisioning commits only as much storage space as the disk needs for its initial operations. Example: if the allocated storage is 40 GB & only 20GB is used, then the remaining space can be used for another VM. Further, if the disk requires more space, it can grow into its entire 40GB provisioned space.

Difference between Thick Provisioned Eager Zeroed and Thick Provisioned Lazy Zeroed

VMware Virtual Disk Thick vs Thin Provisioning

For example: Create and allocate the 40 GB of hard disk space.

Lazy zeroed disk occupies the entire space of the disk and the blocks containing older data on the storage device are only cleared when the virtual machine writes new data to the disk for the first time.

Eager zeroed disk also occupies the entire space of the disk, but the blocks on the physical storage device are formatted with zeros at the time of hard disk provisioning itself to overwrite any older data.

How to provision virtual disks

Provisioning virtual disk is primarily done through the vSphere Client.

You select a Virtual Machine and edit its settings to add a virtual disk to it:

  • Select a Virtual Machine and click Edit Settings
  • Select Add New Device
  • Select Hard Disk
  • Specify all Hard Disk parameters
  • Click OK

Of course, you can also leverage the New-HardDisk cmdlet in PowerCLI.

For example:

New-HardDisk -VM App02 -CapacityGB 30 -Datastore “vsan01” -StorageFormat Thin

VMware Virtual Disk Thick vs Thin Provisioning

Manage virtual disks

WARNING: Rule 1 of virtual disk management: Always ensure you have a backup in place of your data before performing any Day 2 operations tasks on virtual disks.

The easiest way to identify if a disk is provisioned thin, thick lazy zeroed or thick eager zeroed is to simply inspect the Virtual Disk details in the vSphere Client:

VMware Virtual Disk Thick vs Thin Provisioning

You can also leverage PowerCLI and the Get-HardDisk cmdlet to inspect a virtual machine hard disk.

A quick and easy way to list all the hard disks and their storage types is to use the following PowerCLI command:

Get-VM | ForEach {Get-harddisk -VM $_ | Select-Object -Property Parent, Name, StorageFormat}

VMware Virtual Disk Thick vs Thin Provisioning

Converting Thick to Thin

To migrate a thick provisioned hard disk (lazy zeroed or eager zeroed) to a thin provisioned disk to save disk space, for example, the easiest way is to perform a Storage vMotion to another datastore.

The migration wizard will provide the option to select another target disk type:

VMware Virtual Disk Thick vs Thin Provisioning

If you only have a single datastore, another option is to leverage the ESXi CLI and the vmkfstools utility for an offline migration.

For example: vmkfstools -i Web01.vmdk -d thin Web01-thin.vmdk

VMware Virtual Disk Thick vs Thin Provisioning

Using the vSphere Client, you can now shut down the virtual machine and replace the old disk with the newly converted disk.

Converting Thin to Thick

Storage vMotion is also the easiest method here.

You can also easily “inflate” a thin provisioned disk by selecting the virtual hard disk in the datastore browser, and selecting the “Inflate” option in the vSphere Client:

VMware Virtual Disk Thick vs Thin Provisioning

PowerCLI allows you to programmatically handle this as well.

For example: Get-HardDisk -VM App02 -Name “Hard disk 2” | Set-HardDisk -Inflate

VMware Virtual Disk Thick vs Thin Provisioning

VMware Disk Provisioning Best Practices

When designing virtual disks for your workloads, there are some design qualities to take into consideration, of which performance is the number one denominator.
If a workload requires low latency, high-performance storage, thick eager zeroed virtual disks are the best option because both thin and thick lazy zeroed disks add latency to the I/O path.

For all other workloads, most administrators nowadays choose thin provisioned disks as their default. This does mean you need to closely monitor your storage capacity.

If capacity monitoring and capacity management are not well implemented, thick provisioned disks are also a safeguard to protect against running out of physical storage capacity undetected. Because thick lazy zeroed disks do not offer any advantage over thick eager zeroed disks, besides less time to create, always use thick eager zeroed disks as a best practice guideline. Eager zeroed thick disks also improve the security posture because old data is wiped.

Comparison of Thin, Thick Lazy Zeroed & Thick Eager Zeroed

Creation Time Performance penalty Block allocation Zeroing
Thin Fastest Highest On first write On first write
Lazy Zeroed Normal Normal At creation time On first write
Eager Zeroed Slowest None At creation time At creation time

Looking for a robust, comprehensive and cost-effective solution for VMware backup? Try a full-featured, 30-day free trial of BDRSuite.

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post