Choosing between fixed or dynamic VHD for SAN storage
Opinions vary but the general consensus is that fixed virtual hard disks (VHDs) are more "SAN-friendly" than dynamic VHDs when it comes to storing virtual machine files on a storage area network.
Here's what a reader named Quentin replied to us in response to this question in an issue of our WServerNews newsletter:
Variable size VHDs can either be a handy thing that produces great results, or can be a great way to hide problems and make them very difficult to find and troubleshoot.
Good things to use variable size VHDs for - anything that stays relatively static in content, but might occasionally need to expand. O/S disks are something that fits this category. You rarely change anything on an O/S disk - that is unless you have a dynamically sized page file. If you are going to do a variable sized VHD for your O/S, then fix the page file size so it isn't changing up and down all the time.
Bad things to use variable size VHDs for - anything that constantly grows in size. Every time a variable size VHD bumps up against its max size on disk and needs to add some more blocks, there is a significant overhead, at least in the O/S managed versions like HyperV for instance. So the worst case scenario is an SQL DB that grows the DB or transaction log. Performance can be downright dismal to the point where SQL itself will throw errors into the log about the disk speed. The problem isn't disk speed per-see, but the overhead involved in resizing the disk with almost every transaction. MS has actually done a lot of re-writing of the algorithm on this for 2012 server, so the impact is far less, but you are still better off with fixed size disks for DBs. If you happen to be using SAN attached storage and can present the LUNs as raw (VMware) or passthrough (Hyper-V), then even better. Troubleshooting a disk that is constantly changing sizes is sometimes a bit obscure and monitoring tools may just report a slow disk, but not tell you why it is slow.
If you are working with SAN directly, then things are a bit different. SANs may give you more options as to how to provision and have better algorithms to handle expansion. At least all the overhead is not in your VM or server, but in the storage processors on the SAN. With extensive caching it can ease the resizing penalty, or maybe even remove it entirely since some operations can be done in parallel.
The above tip was previously published in an issue of WServerNews, a weekly newsletter from TechGenix that focuses on the administration, management and security of the Windows Server platform in particular and cloud solutions in general. Subscribe to WServerNews today by going to http://www.wservernews.com/subscribe.htm and join almost 100,000 other IT professionals around the world who read our newsletter!
Mitch Tulloch is an eleven-time recipient of the Microsoft Most Valuable Professional (MVP) award and a widely recognized expert on Windows Server and cloud computing technologies. Mitch is also Senior Editor of WServerNews. For more information about him see http://www.mtit.com.