Thin/Thick Provisioning

jskfan
jskfan used Ask the Experts™
on
Any expert out there to explain the difference between thin and thick provisionning disk.
If I understand when creating a new VM , a disk size is allocated.  for instance if 5GB is allocated what would be the effect of making the disk thin or thick provisionning?

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010
Commented:
If it is thin provisioned only a few Megabytes are actually allocated on disk, then as the space is used up the disk file will grow up to the 5GB maximum.

If thick provisioned all of the 5GB is allocated up front.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
http://www.vmware.com/files/pdf/VMware-vStorage-Thin-Provisioning-DS-EN.pdf

What is a thin provisioned disk?
 
When creating a virtual disk file, by default, VMware ESX uses a thick type of virtual disk. The thick disk pre-allocates all of the space specified during the creation of the disk. For example, if you create a 5 megabyte disk, all 5 megabytes are pre-allocated for that virtual disk.
 
In contrast, a thin virtual disk does not pre-allocate all of the space. Blocks in the VMDK file are not allocated and backed by physical storage until they are written during the normal course of business. A read to an unallocated block returns zeroes, but not back the block with physical storage until it is written.

http://www.vmware.com/files/pdf/thin_provisioning_datasheet.pdf

Author

Commented:
Let me see if I understand what you are saying:

Thin:
if 5GB is allocated , then as long as the files are written to disk , the used space is growing up to 5GB.

a- what about the unused space before the 5GB are used up ? Does that mean if I have written 3GB out of the existing 5GB, then from the 2GB left I can create another Virtual disk?
b- what if the 5GB are used up does it automatically allocate more space?

thanks
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

The point of thin provisioning is to effectively use disk space that you would otherwise not use if thick was set

If I set 100 VMs at a 5GB THICK, then I've used up 500 GB of space

With thin, you can do the same and set the expansion limit of the disk to a number (say 5GB for example) but you'll only use a small amount of space and it won't expand unless you write data to it (Guest OS, files, apps, etc...). So in our 100 VM example, you could only use 55 GB of total data and still deploy 100 VMs (and the max would be 500GB (assuming 5GB per VM maximum)

To answer A, yes. If space is available you can deploy multiple VMDKs and set them to THIN but keep in mind that if the maximum is set to greater than what you have physically, you'll overcommit and once you reach 100% physical use, the VM wil have no where to write files to.

To answer B, no it doesn't auto-expand but you can expand/extend the datastore if the limit is reached, you'll just have to power off the VM and expand the datastore. If you have good monitoring and alarm triggers, you should catch that rather early on and not have to worry about significant impacts.

Author

Commented:
OK ....
IF I allocate 5GB THICK, means 5GB is all taken by that VM machine.?
IF I allocate 5GB THIN but only 3 have been used , means the unused space still can be allocated to another VM Machine ?

is that the difference ?
Yes. Thick means 100% allocated regardless of how much is actually written (just like a hard drive in a laptop or server)

Thin means small amounts up to a maximum limit and any unused space can be used to spin up another VMDK file

Keep in mind it's all relative to how much space is on the datastore the VMs/VMDKs are running off of. So keep a good eye on how much space is used (thick or thin) and if you start to approach 80-90% and you noticed that you have some thin provisioned disks that aren't max'ed out. Then you need to make preparations to expand or deploy another datastore.

Hanccocka's link (above but I've also included it here) to the VMware white paper on Thin vs Think provisioning is a good read and it does a good job illustrating the differences as well.

http://www.vmware.com/files/pdf/VMware-vStorage-Thin-Provisioning-DS-EN.pdf

Author

Commented:
When monitored by Alarms, Thin is helpful in case we cannot make an assumption how much disk size we need for a certain VM.
Not sure if that was a question but yes. You could leverage alarms to monitor the datastore use in the event you don't have an idea how big you want to make a disk file on a VM.

As stated in the article linked by myself and Hanccocka

• Alarms and reporting. Thin Provisioning is integrated with VMware vCenter™ Server. Therefore, you can provide reports and set thresholds to proactively manage growth and capacity.

• Oversubscription protection. Thin provisioning can lead to oversubscription. Manage oversubscription by Storage VMotion (which enables dynamic migration of VMDKs) or VMFS volume grow (which provides the ability to dynamically increase the size of your datastore.)

Adding to the second bullet, if you can't do either the above mentioned (Storage vMotion or VMFS voulme grow) then adding disks or presenting a new LUN is another option as well.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
Yes, that is correct, but be careful because if using Thin Provisioning you need to check that if all VMs, wanted to use 5GB, you have enough disks space to allocate to them.
Top Expert 2010
Commented:
Absolutely correct - thin provisioning must be monitored and managed if you will be oversubscribing the amount of physical space available on the datastore. You can get yourself into trouble fairly quickly if you don't. But it isn't really a lot different than the fact that you must monitor and manage available storage if you are going to use the snapshot facilites.

Thin provisioning pays off if you have a lot of users that will likely never fill up the 5GB (or 10GB or 20GB etc.) that they are asking for. It will save real dollars for real storage that would otherwise not really be used. I use thin provisioning extensively wherever I can. However I pretty actively monitor how deeply datastores are oversubscribed and how much actual free space remains on each datastore.

Author

Commented:
thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial