VMware Solutions Discussions

MBRALIGN 64K Blocks

tkutil1962
5,118 Views

I am trying to align to a 64K block size with MBRALIGN and it only uses the default of 8K

Am I doing something wrong with the command line or is there something more I need to do on the VM?

When I run ( mbralign --preview --bs=64 BlockTest.vmdk ) it shows it will do a 64k block.

This is the command line I am using.

mbralign --bs=64 BlockTest.vmdk

TIA

5 REPLIES 5

tkutil1962
5,118 Views

Just some more information

I created an 8GB W2K3 VM from scratch which was misaligned. I ran mbralign --bs=64 on it and it aligned to 8k blocks.

I am looking at the block offset using msinfo32 and the Partitioning Starting Offset is now 32,768.

I created another VM using the method described in this article to create a 64K block partition and the Partitioning Starting Offset 65,536

http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1344730_mem1,00.html

I was assuming that mbralign would give me the same result as what I had accomplished with WinPE without destroying the actual VM.

Am I off or confused about what mbralign can do?

forgette
5,118 Views

Hi Troy,

The --bs=64 tells the mbralign utility to use 64KB blocks for each IO while aligning the file.  It does not specify the starting offset.

There isn't an option to specify the starting offset because mbralign automatically finds (and uses) the next properly aligned value for each partition.  The first (safe) usable offset is 32KB (or 32,768 bytes).


Hope this helps,
-Eric

tkutil1962
5,118 Views

Am I misunderstanding alignment with the size of blocks that data is stored in. I've read that 64K is optimal for W2K3 VMware on SAN. So I am trying to understand. I know Vizioncore's vOptimizer does the partion alignment and assumed that this is wat MBRALIGN was doing.

Thanks for helping to better understand the technology since I am pretty new to this and am trying to make the right decisions.

vOptimizer Pro provides:

Windows Partition Alignment

Proper partition alignment is fundamental for reduced latency and increased throughput in virtual machines. vOptimizer Pro uses a patent pending process to align partitions on the 64k offset and on the 64k fold position ensures best possible performance for your VMware

forgette
5,119 Views

I agree this can become confusing very quickly.  Here is a quick summary of alignment, block size and how it relates to the guest filesystem.

Offset (alignment)
The mbralign tool was designed to ensure proper block alignment of the guest filesystem (in each partition) to the NetApp controller.  My guess is that the product from Vizioncore attempts to do the same thing, however because their product was written for storage controllers in general (not just NetApp), they had to choose an offset that would fit most cases (basically a least common denominator).  Incidentally, an offset of 64KB will be properly aligned on a NetApp controller as well.  Technical Report (TR-3747) covers guest filesystem alignment in depth.

Block size
The guest filesystem stores information in blocks.  The smaller the block size, the more efficient the use of capacity will be.  For example, if my blocksize is 64KB and I store a 16KB file, I will be wasting 48KB of space.

Block size and NTFS
In NTFS parlance, blocks are called clusters.  The size of the cluster is dependent on the size of the file system.  The default cluster size for NTFS on WinXP and Win2K3 is 4KB for filesystems ranging in size from 2GB to 2TB.  For the majority of workloads (virtual or otherwise), this block size provides an excellent balance between capacity utilization and throughput.  There are certain workloads that can benefit from larger block sizes.  In most cases though, the applications or databases that will benefit from larger block sizes tend to call this out in the installation manual and best practice papers.   

peterl
5,118 Views

Hi Troy

64KB is optimal for many other RAID vendors because that's the allocation unit / RAID block size they use.  ONTAP / WAFL uses 4KB so any multiple of that block size will work, although we pick 32KB for the first partition for a couple reasons.  For one thing, as Eric said, that's the next 4KB alignment after the Windows default of 32256.

Peter

Public