Translate

Total Pageviews

My YouTube Channel

Friday 1 November 2013

Something I didn’t known about VMFS sub-blocks (Very Good and Informative Vmware Blog Post)

Well, there is probably quite a lot I don't know about VMFS sub-blocks to be honest, but I recently learnt something new about sub-blocks on VMFS which I thought I already understood, but clearly didn't.
Sub-blocks are small allocations on a VMFS volume, and they are used to back small files. This saves space as you do not have to use a full file block to back a very small file (and on VMFS-3, this file block could be as large as 8MB).
Lets ignore the fact that VMFS-5 has a new small file support mechanism now (you can read all about this here). My incorrect understanding was that sub-blocks were used to back files on a VMFS until that file reached the 1MB limit. So for a file of say 512KB, you might use 8 sub-blocks on a VMFS-3, each sub-block being 64KB. I then thought that when the file reach this 1MB limit, it was then switched to being backed by actual file blocks.This is not the case.
In fact, what happens is that only a single sub-block is used to back a small file on VMFS and when the file size grows to be g
reater than 1 sub-block (64K on VMFS-3 & 8K on VMFS-5) then the file is flipped to being backed by actual file blocks.
This explains why, when listing file attributes on a VMFS-3 volume, you only ever see it as 64K in size, or a multiple of the file block size.
One of the cool things in VMFS-5 is that there are now a lot more sub-blocks. One issue we had in the past was that when the sub-block pool was exhausted, VMFS had to back very small files with actual file blocks. So if you had a lot of small files on the volume, you could end up with a lot of stranded space because actual file blocks were backing tiny files. This should be alleviated in VMFS-5 as there are now 8 times as many sub-blocks compared to VMFS-3 (32,000 vs. 4,000)
And just as a final clarification, these are for only backing small files that exist on a VMFS datastore. Sub-blocks are not used for backing files which reside inside a Guest OS. The Guest OS runs on a VMDK, which will be backed completely by file blocks because its size will (most very likely) always be greater than 1MB.
Source:-

No comments:

Post a Comment