Thin provisioning types in vSphere
Thin provisioning is a popular technique used by both vSphere and storage administrators to better control the amount of disk space that is used for storing virtual machine files. Through the use of thin provisioning, administrators can adequately or over provision store inside a virtual machine without actually wasting the space that remains unused. For example, suppose you’re creating a new virtual machine that will live its life as a file server. You could, for example, provision 500 GB of space for that file server with the expectation that it will take three years to hit this upper bound. Now, suppose that this same server will only have 100 GB of data stored initially. With normal storage provisioning, that would appear to be 400 GB of “wasted” space.
vSphere 5 has three methods by which storage can be provisioned:
- Thin Provision. Thinly provisioned storage is what I was alluding to above. In this scenario, you can assign 500 GB to your virtual machine even though it’s using only 100 GB and you won’t actually “waste” that other 400 GB. vSphere will tell the virtual machine that it has 500 GB of space and will provision space on demand as the virtual machine grows in size. Obviously, if you use thin provisioning, you need to keep a careful eye on usage so that you don’t accidentally run out of space. Short version: Not all of the storage blocks are allocated at the time the disk is created.
There are two “thick” disk formats. In both scenarios, all of the space that is allocated to a virtual machine is reserved for that virtual machine regardless of how much is actually used by the virtual machine. So, if you create a 500 GB disk, 500 GB of space will be reserved and can’t be used for anything else. This does prevent overallocation of disk resources, but can introduce waste unless you’re very careful about how much space you assign to VMs.
- Thick Provision Eager Zeroed. With an eager zeroed tick provisioned disk, all disk space is allocated as per your instructions and that space is actively zeroed out at the time you provision the disk. As you use the disk, vSphere doesn’t have to do do any additional work.
- Thick Provision Lazy Zeroed. A lazy zeroed disk also has all of its space allocated at the time you create the disk but the blocks aren’t actively zeroed out. As you begin to consume more space in the VMDK file, vSphere will need to take a bit of time - generally imperceptible - to prepare space that has been allocated but not used yet.
For the absolutely best performance possible, eager zeroed thick is your best choice, but thin provisioning shouldn’t be discounted just for minor performance reasons. However, there are some other reasons that you wouldn’t use thin provisioning. I’ll explore the pros and cons of thin provisioning in my next post.