VMware Cloud Community
gogogo5
Hot Shot
Hot Shot

VMFS Partition Alignment

I have read VMware's document on Recommendations for Aligning VMFS Partitions and have a question:

1. If you use the VC to add VMFS storage to an ESX host, do you still need to perform guest file system alignment within the VM itself? The guest being Windows 2003 in my case.

I am trying to ascertain whether you need to do this regardless if you have used VC or fdisk to add the storage to an ESX host.

Seems a tedious process to follow every time you want a new VM built. I know you could add the second disk as part of a template but maybe you don't know the disk size requirements.

Reply
0 Kudos
37 Replies
SteffenHKA
Contributor
Contributor

What a storage box are you using? I know that EMC Storage must be alignt. On the VMFS an in the VM.

Reply
0 Kudos
ajnrock
Enthusiast
Enthusiast

It is my understanding that you no longer needed to worry about alignment offset in VMFS as of ESX 3.x. You still should do the diskpart thing when creating the partitions for your VMs.

Reply
0 Kudos
gogogo5
Hot Shot
Hot Shot

We are using EMC CX700 SAN.

So do you guys do this for each VM you deploy? Is it part of your VM deployment procedure? Just wondering since the procedure, though simple, is fairly tedious to perform for each new VM you deploy.

Reply
0 Kudos
ajnrock
Enthusiast
Enthusiast

Yes, but to be fair, this is something you should also do on any physical server with intensive IO whether using DAS or SAN. It is amazing how many people do not know this. When you skip this on VMs the problem is further compounded. It is really not that big of a deal once you get into the habit.

Reply
0 Kudos
gogogo5
Hot Shot
Hot Shot

And thats my point, when you say "It is amazing how many people do not know this" I can relate to that! I am just surprised at the little amount of postings on this subject given its significance.

Reply
0 Kudos
ajnrock
Enthusiast
Enthusiast

I also was not "in the know" until attending some SAN training. After seeing the light, and doing some research, I realized that over the years much disk performance on high end storage had been left on the table. For standard app servers on a single disk or RAID 1 volume, there is not much impact. I have heard that DBs spanning multiple disks can degraded by as much as 25% depending on the variables.

Start searching M$ for diskpart and offset alignment and you will start finding bits and pieces of info. Talk to a storage guru and they will drill it into you. Just do it.

Reply
0 Kudos
kix1979
Immortal
Immortal

See this doc http://www.vmware.com/pdf/esx3_partition_align.pdf

Thomas H. Bryant III
Reply
0 Kudos
fdouma
Contributor
Contributor

For what it is worth (IMHO):

I've researched this extensively and read just about everything written about this issue as well as discussed it at length ESX class as well as with my EMC contacts.

We are at ESX 3.0.1 and VC 2.0.1

We run CX-700 and CX3-40 holding our VM's.

Our VM's are either RH 3.0/4.0 or W2003.

Our VM's are almost dataless, they are primarily compute engines.

We used VC to create all the datastores, so the datastores themselves are already aligned according to the docs I found.

However, the VM's OS disks themselves (eg. sda on RH and C: on W2003) are NOT aligned on top of/within the datastore.

After reviewing all the available docs, and trying and failing under RH to align sda during OS install, I have given up on the whole concept.

Given our write rate is miniscule, and our read rate is about as low, I've concluded it just simply doesn't matter for us. Remember, our VM's are compute engines, so they don't do much I/O to the OS disk - which is the only disk they have.

I think were I to have \_very_ significant disk I/O on my VM's I'd probably worry about it. But, around here, and I would venture a guess, for a lot of folks, it is a worthless endeavor to worry about it.

I welcome comments/questions/arguments!

kix1979
Immortal
Immortal

Aligning the partitions actually can save you a lot of headaches for a few reasons. If you backup at the VM image level and the partitions inside the guest are not aligned, you will have data in chunks that span blocks, so you always have 2 blocks with data instead of 1. Also if you plan to put SQL, Exchange etc... in a VM you really must do the alignment for performance reasons. Same goes if you plan to have lots of little files being read/written. Reading off 1 block is a lot faster then 2 blocks.

Thomas H. Bryant III
conradsia
Hot Shot
Hot Shot

here are diskpart instructions for 2K3

http://technet.microsoft.com/en-us/library/aa995867.aspx

Reply
0 Kudos
fdouma
Contributor
Contributor

I've seen the performance data.

Please don't take this as an attack, but.....

You're really just regurgitating what the issue is, not its effects.

"lots of headaches"

"a lot faster"

"really must do the alignment"

These are pretty vague. I understand the issue, as you do, as probably everybody does. However, I've decided it's just not a problem unless I'm planning to do a lot of disk I/O from my VM's to my Clariion backed VMFS'.

I'm committing my own sin here, as "a lot of disk I/O" is vague as heck, but you can Google up some performance docs testing this. I took their conclusions as "if you aren't pushing I/O hard, don't worry about it".

Also, I don't get "2 blocks with data instead of 1". I think you've a 64K block of data that starts on one disk and concludes on the next. There is no unused space, you just have to do two disk I/O's to satisfy the 64K i/o.

Lastly, I'm speaking ONLY of aligning the VM's OS disk as well (eg. sda for RH, C: for Windows). We didn't have much luck trying to align for RH or Windows at install - we've got no tool from the OS to align the OS that hasn't been installed yet. We're we to add n+1 disks, I'd align every one with either fdisk or diskpar.

Reply
0 Kudos
meistermn
Expert
Expert

How can this be done with dos ?

Our Servers are setup per unattend per dos?

Meistermn

Reply
0 Kudos
kix1979
Immortal
Immortal

No way to do this with dos, but you can use PE to do this.

Thomas H. Bryant III
Reply
0 Kudos
gogogo5
Hot Shot
Hot Shot

Hello kix1979, the link you posted is the document I am referring to in my first posting, but thanks anyway.

Interesting replies and I will award some points. I hadn't considered the VM level backup issues so I will probably perform the alignment of any n+1 disks. My VMs are similar to fdouma (mainly compute orientated) and did take note in the VMware doc that performance latency is only noticeable in disk I/O intensive operations.

Its seems simple to align the data disk but not the OS disk, but then is the OS disk that disk intensive? Should we move the pagefile to the aligned disk since this is the most active Windows file or should I get a life Smiley Happy The list of tweaks goes on and on....

Reply
0 Kudos
gogogo5
Hot Shot
Hot Shot

A follow up question. Looking at the link that conradsia posted http://technet.microsoft.com/en-us/library/aa995867.aspx, once you come to format the disk, do you still select 32K as the Allocation Unit size?. This was the step that was listed in the procedure when using diskpar and not diskpart and wondered whether this applies to the diskpart method.

Reply
0 Kudos
kix1979
Immortal
Immortal

Sorry for reposting it, but there is definitely an advantage to doing it. I do the OS drive via using a Windows PE disk and format it from there. Then that blank 10G formatted and aligned VM becomes my template for creating all my other templates. That way all VMs are aligned properly. You don't have to move the pagefile, but it can help especially if you decided to do image level backups.

Thomas H. Bryant III
Reply
0 Kudos
ajnrock
Enthusiast
Enthusiast

32 is a good starting point, and is fine for most uses. Depending upon the application there may be benefits to going bigger, but testing would be required.

Paging can be disk IO intensive if you are using your page file. Use perfmon to determine this. We always put our page file on it's own volume, keeps the boot volume from getting fraged.

My final two cents - even if you have very low disk IO on your VMs, if you have a high quantity of VMs with low IO and improperly aligned partitions, you may not see a performance hit on your VM guests or hosts, but you are working your SAN harder than it needs to, causing extra read/write operations that will slow down your storage overall. Again, depending upon volume you may or may not notice it, but why not do it right the first time, it will take less than a minute per VM once you get in the groove, probably less with templates.

Reply
0 Kudos
ajnrock
Enthusiast
Enthusiast

Oh, and one more thing I meant to post.........

The Allocation unit needs to be either divide evenly into 64 or be a multiple of 64, otherwise your hard work of getting the right alignment offset is for naught.

Reply
0 Kudos
gogogo5
Hot Shot
Hot Shot

Thanks.

Reply
0 Kudos