VMware and NetApp Optimization Tips
·
VMNEX 3 -- install latest version of VMware tools, get MAC address (getmac), and install newer NIC.
·
Disk Alignment -- Use Dell/Quest free vOptimizer Wastefinder utility
·
Thin Provision VM -- Using VMware Converter set to Thin Provision.
·
Thin Provision NetApp Volume -- Enable on NetApp volume
·
De-Dup and Compression -- Enable on NetApp volume
·
Snapshots -- Enable on NetApp Volume.
·
Remove and Re-allocate partitions
RE-Post of http://www.blueshiftblog.com/?p=300
Why Disk Alignment is important (and how to fix a misaligned VM)
Your disk system and your Windows VMs may be running slower than necessary. Some simple steps can help to improve disk performance by 9 – 13% in your virtual infrastructure.
By now many are familiar with the disk alignment issue but a quick recap. DBA’s and Exchange admins are very familiar with this concept as they need to drive disk performance for their databases. The same principle applies to virtualization. Here we go…
UPDATE: 11/3/11 — Take a look at Nick Weaver’s free UBERAlign tool which can diagnose and correct alignment issues.
The graphic above shows the three layers at issue. There are the SAN blocks at the bottom, then the VMFS blocks in the middle, and then the NTFS blocks used by the Windows VM. If these three layers are not aligned, your SAN may be working harder than it needs to. For example, a call to read a single NTFS block may require the SAN to read three blocks as shown below:
That’s not very efficient. What would be ideal is for these layers to be aligned so that a single NTFS block requires only one SAN block to be read as illustrated below:
These graphics were taken from the ESX 3 whitepaper, Recommendations for Aligning VMFS Partitions
Let’s talk about how to fix this at both the VMFS and NTFS levels.
VMFS Alignment
When VMFS volumes are created by the vSphere client, they are aligned on a 64K boundary. Check your SAN vendor’s documentation but in most cases the default 64K boundary will work. For more details, consult the Performance Best Practices for vSphere 4.0 whitepaper.
NTFS Alignment
By default Windows 2003 and older will align on 32K which will not be aligned with the 64K VMFS layer. Windows 2008 solves this problem by aligning on a 1024K boundary – this works because 1024K is divisible by 64K. For example:
- 32K (NTFS) / 64K (VMFS) = 0.5 = not aligned.
- 1024K (NTFS) / 64K (VMFS) = 16.0 = aligned.
As long as there is no fractional remainder in this exercise, the two layers are aligned.
Now that we understand the problem and how it impacts performance, let’s focus on determining what VM’s have the problem and ways to fix it.
IDENTIFYING THE PROBLEM
VM’s running Windows 2008 or later should already be aligned as noted above. If a VM is running Windows 2003 you can check for alignment by one of three ways:
1) Use the list partition command within Microsoft’s DISKPART utility.
2) Create a WMI query for the desired attributes by running the following command:
The output will be in bytes so just divide by 1024. A 64K aligned partition will have a starting offset of 65536.
3) Use Vizioncore’s free vOptimizer Wastefinder utility which can scan and identify all your VM’s for misalignment.
#1 or #2 will work fine if you just want to check a specific VM, but Vizioncore’s free utility may be the quickest way to scan your entire environment.
CORRECTING ALIGNMENT PROBLEMS
Once you create a Windows partition you can’t easily change the alignment. If you are deploying a new Windows 2003 VM, you can use the DISKPART utility to force alignment on a 64K boundary (align = 64).
But what about existing Windows 2003 servers which are not aligned? One way would be to create new aligned partitions in a new VM and restore/rebuild everything to the new VM, but that’s time consuming and risky.
Vizioncore offers two products which can solve this problem for non-aligned Windows 2003 VM’s:
This is the full version of the free Wastefinder utility mentioned above. This product can automatically re-align VM’s on a 64K boundary. In addition it can resize VMDK’s on a reoccurring schedule in order to significantly reduce storage capacity.
This updated version of vConverter will now automatically align on a 64K boundary while performing either a P2V or a V2V migration. You can use this tool to perform V2V migrations, which will result in aligned disks. As far as I am aware this is the only P2V/V2V tool that will automatically realign the target VM on a 64K boundary.
And there you have it in a nutshell. Two other issues I’d like to quickly point out.
First, you may have a number of Windows 2008 VMs, but if a misaligned VM of any OS is on the same VMFS volume, it could potentially be impacting disk performance for all the VM’s on that volume.
Second, just because a VM is running Windows 2008 it may still be unaligned. If you did an in-place upgrade of Windows 2003 to Windows 2008 the disk partitions were never modified. You’ll need to either rebuild the VM or use one of the methods above to correct it.
3) Use NetApp MBR tools.
**Special note: The VM has to be in a powered off state for this to work. It should resize the drive size from 32 K to 64K when it is finished.
Download the NetApp MBR tools
SSH into the VMware ESXi host
Install the NetApp MBR tools
go to cd /opt/ontap
type the command /opt/ontap/mbrscan/vmfs/volumes/XXXX/VMname/VMname-flat.vmdk
type the command /opt/ontap/mbralign /vmfs/volumes/XXXX/VMname/VMname-flat.vmdk
4) Use Acronis Disk Director Advanced to get re-align the Disks.
VMware Reclaim Space : Possible Solution 1
After using "sdelete -c C:", when you Storage vMotion the thin disk to another volume to reclaim the zeroed space, it must be to a volume with a different block size.
VMware Reclaim Space : Possible Solution 2If you have a NetApp, there is a built in NetApp Plug-in that can aide in reclaiming the space when converting from a Thick to Thin provisioned drive.
3) Use NetApp MBR tools.
**Special note: The VM has to be in a powered off state for this to work. It should resize the drive size from 32 K to 64K when it is finished.
Download the NetApp MBR tools
SSH into the VMware ESXi host
Install the NetApp MBR tools
go to cd /opt/ontap
type the command /opt/ontap/mbrscan/vmfs/volumes/XXXX/VMname/VMname-flat.vmdk
type the command /opt/ontap/mbralign /vmfs/volumes/XXXX/VMname/VMname-flat.vmdk
4) Use Acronis Disk Director Advanced to get re-align the Disks.
VMware Reclaim Space : Possible Solution 1
After using "sdelete -c C:", when you Storage vMotion the thin disk to another volume to reclaim the zeroed space, it must be to a volume with a different block size.
VMware Reclaim Space : Possible Solution 2If you have a NetApp, there is a built in NetApp Plug-in that can aide in reclaiming the space when converting from a Thick to Thin provisioned drive.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.