Posted by Cormac Hogan
Technical Marketing Manager (Storage)
This is a discussion that comes up regularly, going way back to vSphere 4.0 when we first introduced some serious features around thin provisioning storage for Virtual Machines. The objective of this post is to take a look at what options are available to you to do over-commitment/over-allocation of storage, as well as avoiding stranded storage scenarios. The whole point of thin provisioning, whether done on the array or at the hypervisor layer, is to allow a VM to run with just the storage it needs, and to avoid giving a VM storage that it might use sometime in the future. After all, you're paying for this storage, so the last thing you want is to be paying for something you might never use.
Lets begin by looking at the various types of Virtual Machine disks (VMDKs) that are available to you.
VMDK Overview
Thin – These virtual disks do not reserve space on the VMFS filesystem, nor do they reserve space on the back-end storage. They only consume blocks when data is written to disk from within the VM/Guest OS. The amount of actual space consumed by the VMDK starts out small, but grows in size as the Guest OS commits more I/O to disk, up to a maximum size set at VMDK creation time. The Guest OS believes that it has the maximum disk size available to it as storage space from the start.
Thick (aka LazyZeroedThick) – These disks reserve space on the VMFS filesystem but there is an interesting caveat. Although they are called thick disks, they behave similar to thinly provisioned disks. Disk blocks are only used on the back-end (array) when they get written to inside in the VM/Guest OS. Again, the Guest OS inside this VM thinks it has this maximum size from the start.
EagerZeroedThick – These virtual disks reserve space on the VMFS filesystem and zero out the disk blocks at creation time. This disk type may take a little longer to create as it zeroes out the blocks, but its performance should be optimal from deployment time (no overhead in zeroing out disk blocks on-demand, meaning no latency incurred from the zeroing operation). However, if the array supports the VAAI Zero primitive which offloads the zero operation to the array, then the additional time to create the zeroed out VMDK should be minimal.
Option 1 – Thin Provision at the Array Side
If you're storage array supports it, devices/LUN can be thinly provisioned at the back-end/array. The advantage is physical disk space savings. There is no need to calculate provisioned storage based on the total VMDKs. Storage Pools of 'thin' disks (which can grow over time) can now be used to present datastores to ESXi hosts. VMs using thin or lazyzeroed VMDKs will now consume what they need rather than what they are allocated, which results in a capex saving (no need to purchase additional disk space). Most arrays which allow thin provisioning will generate events/alarms when the thin provisioned devices/pools start to get full. In most cases, it simply a matter of dropping more storage into the pool to address this, but of course the assumption here is that you have a SAN admin who is monitoring for these events.
Advantages of Thin Provisioning at the back-end:
- Address situations where a Guest OS or applications require lots of disk space before they can be installed, but might end up using only a portion of that disk space.
- Address situations where your customer state they need lot of disk space for their VM, but might end up using only a portion of that disk space.
- In larger environments which employ SAN admins, the monitoring of over-committed storage falls on the SAN admin, not the vSphere admin (in situations where the SAN admin is also the vSphere admin, this isn't such an advantage)
Option 2- Thin Provision at the Hypervisor Side
There are a number of distinct advantages to using Thin Provisioned VMDKs. In no specific order:
- As above, address situations where a Guest OS or applications require lots of disk space before they can be installed, but might end up using only a portion of that disk space.
- Again as above, address situations where your customer state they need lot of disk space for their VM, but might end up using only a portion of that disk space.
- Over-commit in a situation where you need to deploy more VMDKs than the currently available disk space at the back-end, perhaps because additional storage is on order, but not yet in place.
- Over-commit, but on storage that does not support Thin Provisioning on the back-end (e.g. local storage).
- No space reclamation/dead space accumulation issues. More on this shortly.
- Storage DRS space usage balancing features can be used when one datastore in a datastore cluster starts to run out of space on one datastore, possibly as a result of thinly provisioned VMs growing in size.
Thin Provisioning Concerns
There are a few concerns with Thin Provisioning.
- Possibly the biggest issue that we have with Thin Provisioning is running out of space on a device that is Thin Provisioned at the back-end. Prior to vSphere 5.0, we didn't have any notifications about this in the vSphere layer, and when the thinly provisioned datastore filled up, all of the VMs on that datastore were affected. In vSphere 5.0 a number of enhancements were made through VAAI:
– VAAI will now automatically raise an alarm in vSphere if a Thin Provisioned datastore becomes 75% full
– VMs residing on a Thin Provisioned datastore that runs out of space now behave differently than before; only VMs which require additional disk space are paused. VMs which do not require additional disk space continue to run quite happily even though there is no space left on the datastore.
– if the 75% alarm triggers, Storage DRS will no longer consider this datastore as a destination.
- The second issue is dead space reclamation and the inability to reuse space on Thin Provisioned datastore. Prior to vSphere 5.0, if a VM's file are deleted or if a VM is Storage vMotioned, we had no way of informing the array that we are no longer using this disk space. In 5.0, we introduced a new VAAI primitive called UNMAP which informs the array about blocks that are no longer used. Unfortunately there were some teething issues with the initial implementation but we expect to have an update on this very shortly.
- If the VMDK is provisioned as thin, then each time the VMDK grows (new blocks added), the VMFS datastore would have to be locked so that it's metadata could be updated with the new size information. Historically this was done with SCSI reservations, and could cause some performance related issues if a lot of thinly provisioned VMs were growing at the same time. With the arrival of VAAI and the Atomic Test & Set primitive (ATS) which replaces SCSI reservations for metadata updates, this is less of a concern these days.
So which option should I go for?
Thick on Thin
First, Eagerzeroedthick VMDKs do not lend themselves to thin provisioning at the backend since all of the allocated space is zeroed out at creation time. This leaves us with the option of lazyzeroedthick, and this works just fine on thin provisioned devices. In fact, many storage array vendors recommend this approach, as the management of the over-commited devices falls to the SAN admin, and as mentioned earlier, most of these array have alarms/events to raise awareness around space consumption, and the storage pool providing the thin provisioned device is easily expanded. One caveat though is the dead space accumulation through the deletion of files and the use of Storage vMotion & Storage DRS, but hopefully we'll have an answer for this in the very near future.
Thin on Thick
One of the very nice things about this appraoch is that, through the use of Storage DRS, when one datastore in a datastore cluster starts to run out of space, possibly as a result of thinly provisioned VMs growing in size, SDRS can use Storage vMotion to move VMs around the remaining datastores in the datastore cluster and avoid a datastore filling up completely. The other advantage is that there are no dead-space accumulation/reclamation concerns as the storage on the back-end is thickly provisioned. One factor to keep in mind though is that Thin provisioned VMDKs have slightly less performance than thick VMDKs as the new blocks allocated to the VMDK were zeroed out before the I/O in the Guest OS is commited to disk. The metadata updates may also involve SCSI Reservations instead of VAAI ATS if the array does not support VAAI. However, once these VMDKs have grown to their optimum size (little further growth), then this overhead is no longer an issue/concern.
Thin on Thin
This is the option I get the most queries about. Wouldn't this give you the best of both worlds? While there is nothing inherently wrong with doing thin-on-thin, there is an additional management overhead occurred with this approach. While VAAI has introduced a number of features to handle over-commitment as discussed earlier, thin provisioning will still have to be managed at the host (hypervisor) level as well as at the storage array level. But keep in mind that this level of over-commitment could lead to out of space conditions occuring sooner rather than later. At the VMDK level, you once again have the additional latency of zeroing out blocks, and at the array level you have the space reclamation concern.
With all this in mind, you will have to trade off each of these options against each other to see which is the most suitable for your environment.
How much space does a thin disk consume?
On classic ESX, you can use the du command against a VMDK to determine this.
On ESXi, you can use the stat command against a VMDK to get the same info.
# stat zzz-flat.vmdk
File: "zzz-flat.vmdk"
Size: 4294967296 Blocks: 3502080 IO Block: 131072 regular file
Device: c2b73def5e83e851h/14030751262388250705d Inode: 163613572 Links: 1
Access: (0600/-rw——-) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-02-29 13:04:53.000000000
Modify: 2012-03-01 15:29:11.000000000
Change: 2012-02-22 00:12:40.000000000
This is a thinly provisioned 200GB VMDK (4294967296 * 512) but only ~ 1.8 GB (3502080 * 512) used.
A note on Fault Tolerant VM & MSCS nodes
Be aware that if you turn on FT on a VM, and that VM is using a thinly provisioned VMDK, that VMDK is inflated with zeroes. This is a caveat of FT which uses multi-writer mode on the VMDK, which is needed when the primary and secondary FT VMs are to access the same disk. The same is true for VMs which participate as nodes in Microsoft Clustering – See http://kb.vmware.com/kb/1033570
I may have missed some pros and cons to of some the options listed above. Feel free to leave comments on why you feel one approach is better than another. I'd be very interested to hear.
Get notification of these blogs postings and more VMware Storage information by following me on Twitter: @VMwareStorage





Tony Holland
“I work for DELL Compellent as a VMware Product Specialist”
Hello Cormac and great work again! I did want to point out that some arrays “DELL Compellent” specifically can and will allow a EagerZeroedThick Disk to be thin provisioned from the array side.
Thanks for the great post and keep up the good work!
Tony Holland
Chogan
Good to know – thanks Tony.
From of our offline conversation, this is achieved with Compellent’s ‘Thin Write’ technology which only needs to do a metadata update to write a page of all zeroes. There is no need to actually write zeroes to every location. Interesting stuff.
Jeff
Good stuff Cormac. Nice explanation among the various thin provisioning options.
I’m a Product Manager at Nimble Storage.
Nimble Storage’s default thin provisioning supports EagerZeroedThick disks and since our array supports the VAAI Zero primitive the operation is offloaded to the array, which significantly decreases the VMDK creation time.
Ronny
thanks for this great blog post!
btw: Are there any plans for space reclamation from within the Guest OS (NTFS level)?
regards,
Ronny
Chogan
Hi Ronny,
Thanks for the kind comment.
VMware does have plans to implement a space reclaim mechanism within the Guest OS as we understand this is a pain point for many customers.
At this time, I can’t say anymore than that, but I hope to be able to discuss it in detail later this year.
Cormac
Julian
Hi, the article is extremely clear and interesting.
About the “Thin on Thick” scenario in a small environment, without SDRS: what are the best practices for management (eg. specific alarms and so on) ?
Regards.
Julian
Chogan
Hi Julian,
If I may refer to our Thin Provisioning WP – http://www.vmware.com/pdf/vsp_4_thinprov_perf.pdf – on this:
We recommend setting alarm triggers on Datastore Disk Usage % and also on Datastore Disk Overallocation % to assist in management thin provisioned datastores and overcommitment.
Kind regards
Cormac
Burglar Alarm Systems
Thanks for the post. I had been looking for something related and found your web site in the process.. I will definitely be back for more.
Burglar Alarm Systems
brad wilson
So, on a normal datastore with both thick and thin provisioned VM disks what would happen if one of the thin provisioned VM’s ran the datastore out of space?
Cormac Hogan
Hey Brad,
So if this is vSphere 5.x with a space exhaused VMFS-5 and a VAAI compliant storage array, the thin provisioned VM which needs more disk blocks would be suspended (taken off the run queue). This is the new Thin Provisioning Stun VAAI feature in vSphere 5.x. Once you have addressed the space exhaustion issue by giving the LUN more space at the back-end, the VM can be resumed. VMs which do not need additional disk blocks (thick or thin) when the underlying LUN is exhausted will continue to run happily. There is some more detail in this blog post – http://blogs.vmware.com/vsphere/2011/07/new-enhanced-vsphere-50-storage-features-part-3-vaai.html
Marwan
i had this debate with various people (consultants and instructors), for me i use thin provisioned VMDKs on thick disks, i configured vCenter Alarms for datastore utilization plus i am using SDRS to balance the VMDKs across different datastores, i am using a VNX 5700,5300 which support VAAI and ATS, i found also that thin provisioning allow faster SVmotions but in addition to datastore utilization monitoring one has to monitor the datastore performance as well since with thin provisioned VMDKs on thick LUNs the administrator will be tempted to add more VMs since he still has free space on the datastore to utilize
Keith Martin
Cormac, this is great information. I have one question that I didn’t see…sorry if I missed it. We have seen thin provisioned VMDK files on NFS storage that are larger than Windows NTFS believes they are. Say Windows believes there is only 250 GB in a 500 GB drive, but the VMDK file is 448 GB of the 500 GB allocated. Files were deleted from within windows, but the space was not reclaimed. New data written into the VMDK doesn’t appear to write into the available space, but writes into new space. What happens when the VMDK reaches its max allocated size, but there is still room on the LUN? Will that VMDK grow beyond the max allocated size of 500 GB? Will Windows still be able to write into the VMDK file if the file has reached the 500 GB size but Windows still sees available space?
Thank you.
Cormac
Hi Keith,
This is a common scenario – how do you reclaim dead space from within a Guest OS. We don’t have an answer for this yet although we are working towards a solution with SE Sparse Disks (more here – http://cormachogan.com/2012/09/05/vsphere-5-1-storage-enhancements-part-2-se-sparse-disks/). Right now, you will have to extend the VMDK I’m afraid (but this can be done online).
Tireak
If we’re using thing provisioning from vSphere, what’s a good threshold for over-commitment?
Gene
Great blog as usual! Every time I have a question about something in my environment, I find out you’ve already got the answer or good advice!
Arun Raju
I wanted to inquire about shrinking options for eagerzeroed thick disks.
Is it possible to shrink disks using VMware Converter Standalone or command line tools, Cormac?
Cormac Hogan
Unfortunately, there is still no automated way to shrink disks.
IT_Architect
This is the clearest explanation I’ve seen on this subject. Before reading your article I understood the ramifications of thick and thin. I understood how the zeroed ones worked and their impact on performance, but not the logic as to why anybody would want to use them.
IT_Architect
PS: ls -asl will give you the actual file size in K without having to multiply blocks times 512
maurices credit card
What i do not realize is in fact how you’re no longer actually a lot more well-favored than you may be right now. You are so intelligent. You know thus considerably in the case of this subject, made me personally consider it from numerous various angles. Its like women and men aren’t interested until it’s something to accomplish with Girl gaga! Your personal stuffs outstanding. At all times take care of it up!
Brian
Great article! I have seen a lot of thick on thick in previous jobs. Do these report the same way at all levels regardless of lazy or eager? Can you explain that option a little more in relation to the others in the article?
Mital Shah
Excellent post, extremely useful reading for better understanding!
sbobet
This article will assist the internet visitors for building up new web site or even a blog from start to end.
My web page :: sbobet
sbobet
Very great post. I simply stumbled upon your blog and wished
to mention that I have truly loved surfing around your weblog posts.
After all I will be subscribing on your rss feed and I hope you write once more soon!
My web site :: sbobet
vigrx plus 1 month results
If you are going for best contents like myself, only go
to see this website every day as it gives feature contents, thanks
sbobet
Hi there! Someone in my Facebook group shared this website
with us so I came to check it out. I’m definitely loving the information.
I’m bookmarking and will be tweeting this to my followers!
Superb blog and great design and style.
Review my blog sbobet
sbobet
Thank you for the auspicious writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you! However, how
can we communicate?
Here is my page … sbobet
sbobet
This is really interesting, You are a very skilled blogger.
I’ve joined your feed and look forward to seeking more of
your fantastic post. Also, I’ve shared your web site
in my social networks!
My site – sbobet
buy pure garcinia cambogia
‘Garcinia Cambogia does not fall into the list of modern-day snake oil solutions ‘ it is an effective dual action weight loss supplement that both
turns your body into a fat burning furnace by suppressing
your cravings for foods that will make you happy while at
the same time stunting your body’s ability to
produce unnecessary amounts of fat in the first place,’
the website of the product states. Also,
appetite is suppressed by promoting synthesis of glycogen.
However, they did conclude that ephedrine either alone or with caffeine could promote fat loss while preserving free fatty mass and therefore is useful to a large population of obese subjects in weight loss treatment.
Steven.zhang
Very useful post.
Is there any update about space reclaim funtion? In VM or in datastore
Thanks in advance.
best affiliate marketing tools
excellent points altogether, you simply received a logo new reader.
What might you suggest in regards to your post that you simply made some days ago?
Any sure?
davidjone
What happens if inadvertently a thick is built on thin, or a thin on thin? I would think there would be an impact to read/write IO. Is high CPU utilization an indication of a possible mis-match?
Vishal Khanna
Hello All,
I want to understand that when we map a Think disk with Eager Zero option, when the actual spare will be consumed at storage array end. Is it when the disks is created or disk is formatted or data is written on the disk after formatting it.
Stephany
These expenses include your mortgage principal, mortgage
interest, property taxes and mortgage insurance. The US Government has also been behind this change of scenario
as the FHA has its backing and the measures such as those of elimination of a
mandatory 90-day flipping a house rule and the expansion of the types of
homes that can now be purchased, take condos for example, have been welcomed with warmth.
The next phase of these calculations are slightly more complicated but will provide you with general information.