Problem solve Get help with specific problems with your technologies, process and projects.

How to fix block alignment problems in Windows Server 2003

Windows Server 2003 presents a problem for VMware environments: The operating system recognizes storable space starting at block 31 of the hard drive and in different increments than most storage arrays do. This causes what's called a block alignment problem, and it slows down server performance as well as the virtual machines on the server. If the blocks are aligned, reads and writes happen faster, creating a noticeable performance improvement.

In this video, storage expert Howard Marks explains the benefits of block alignment in Windows Server 2003. Watch the video or read the transcript below.

How many of you still have servers running Windows 2003 in your environment? I'll bet dollars to donuts -- which given the fact a donut now costs $1.30, isn't much of a bet -- but I will bet a substantial amount of money at good odds that your Windows 2003 server runs substantially slower than [it] could, because [in] Windows Server 2003 and earlier … a logical disk (the C drive) … starts at sector 31, or block 31, of a hard disk. But your disk array probably works in chunks bigger than a single sector. In fact, I'll guarantee that there are at least 4 kilobit or 32 kilobit sectors.

So what happens is, you get an NTFS cluster, and the borders of that NTFS cluster don't line up with borders of the VMFS blocks that hold it, and the borders of the VMFS block don't line up with the right RAID stripe. If I write a 4 kilobit write (like I'm a SQL Server 2000, or 2003, or 2008 -- well, 2008 writes an 8 kilobit stripe -- but if I were doing a small write) in order to do that, I've got to read this whole VMFS block back. To read that whole VMFS block back I've got to read both of these RAID stripes, so now every time you do a small write in this nonaligned environment, that gets amplified by a factor of two, or a factor of four, or up to a factor of 16. And so, you're doing a lot more disk I/O than you think you do to satisfy that. If you're running Windows Server 2008, Windows Server 2008 aligns things [at] 1 kilobit, so everything lines up. Writing a 4 kilobit block writes one VMFS block, writes one stripe block.

I suggest you all go to this URL, or at least those of you who are running Windows Server 2003. Nick Weaver, who is an engineer at EMC, wrote and is giving away a free tool, UberAlign, which will take your existing Windows Server 2003 virtual machines and realign them so they fall on four 8 kilobit boundaries, and you'll see something like a 30% performance improvement -- worst case -- just because you've done that. This is especially true if you are using any kind of flash, because flash has a limited ability to write; you can only write so many times to a given location in flash. By reducing the number of writes by a factor of four, you are extending the life of that expensive flash that you're buying by a factor of four. Alignment is important.

View All Videos

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.