One of the mundane tasks of administering a VMware vSphere installation is formatting a virtual machine file system (VMFS) datastore. The block size is an option that can make a big difference in the formatting process.The VMFS block size can be 1 MB, 2 MB, 4 MB, or 8 MB and is selected only during the format phase (Figure A). The 1 MB block size allows a maximum virtual machine disk file (VMDK) of 256 GB; the 2 MB block size allows a maximum VMDK of 512 GB; the 4 MB allows a maximum VMDK of 1024 GB; and the 8 MB block allows a maximum VMDK of 2 TB. Figure A
Click the image to enlarge.
In traditional file systems, the block size governs how efficiently the file system will perform; in the case of a VMFS, the efficiency is not materially affected. This is because VMFS has sub-blocks that ensure there is no waste on the disk. Each sub-block is 64 KB.
Consider the typical content makeup on VMFS volumes: virtual machines and CD-ROM .ISO files. The virtual machines are generally very large files of VMDK, swap files, and possibly a snapshot file. There is also a collection of very small files, such as the .VMX configuration file and virtual machine log files. At first glance, the small files may appear to consume disk space needlessly, such as a 1 KB .VMX configuration file consuming 8 MB on the VMFS datastore; this is not the case, as the sub-blocks can allocate appropriately for the smaller files. This built-in efficiency allows datastores of all sizes to not be effected by the mix of both very small and very large files.
I recommend that you always format at the 8 MB block size. This isn't the default, but other virtualization pros and I can't think of a good reason not to go for 8 MB unless, for some reason, you require VMDKs to be under the 256 GB, 512 GB, or 1024 GB size. A side discussion about this topic recently came up on Duncan Epping's Yellow Bricks blog (he is one of the sharpest VMware resources in the world), and he confirmed there is no downside to using 8 MB blocks for VMFS.
If the logical unit numbers (LUNs) in place are relatively small, say 200 GB, does it still make sense to format at 8 MB block? The answer is yes. Let's say the LUN is expanded on the storage array or extended to another LUN; then it may exceed 256 GB total size, and inevitably a large virtual machine (with a VMDK greater than 256 GB) will come into play.
Do you ensure that VMDK format operations are done at 8 MB? What is your take on block sizes? Share your comments.
Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.