HardwareHow Virtualization Exacerbates Fragmentation

How Virtualization Exacerbates Fragmentation

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

A few weeks ago, ServerWatch covered the importance of fragmentation, particularly with Windows servers. That article touched on the fact that virtualizationseemed to worsen fragmentation. This article delves into that subject in more detail to explain further as well as to highlight a few user examples of the phenomenon.

Hard-Core Hardware: Disk fragmentation is a significant problem for many data centers. Virtualization only makes it worse. Find out what steps you can take to mitigate it.

As to why virtualization is such a boon to heavy fragmentation, let’s start with a basic explanation of fragmentation itself: When Windows writes a file, it generally splits it into multiple pieces spread around the disk. Any time you access that file, each piece must be located, gathered up and then fed to the user. This consumes time and system resources, and frays tempers as you wait for the machine to boot up, the application to load or the file to appear. Over time it gets worse. Things slow down even more and can sometimes be reduced to a crawl.

Now factor in today’s much larger files and massive disk sizes. You’d think that with loads of disk space still available, fragmentation wouldn’t occur. Not so. Windows seems bound and determined to not let tiny pieces of free space remain unused, while at the same time leaving vast tracks of disk unused. Thus, it fragments just about anything it touches. Check it out on a new system with most of the disk unused. Note the level of fragmented files, and hold on to your jaw. Your system files will be hacked to pieces, and when you load your own data files, they too will be mutilated — while free space the size of the Antarctic ice shelf sits nearby. And of course, huge disks filled with colossal files mean much more fragmentation than ever before.

Virtualization enters into the equation in this fashion. Guest OSes are no more than large files. The larger the file is as written, the more likely it is to be fragmented heavily. So the host Windows system typically writes any and all guest OSes in many fragments. But that isn’t the end of it. Unfortunately, the guest OS itself also fragments itself internally. You have fragmentation from the host and from the guest — a double whammy. Therefore, anyone adopting virtualized servers is advised to pay attention to this subject.

From Abstract to Reality

Case in point: Thomas Memorial Hospital in South Charleston, West Virginia. It has more than 200 Windows servers running. It runs a software initiator to connect to an iSCSI SAN. About 70 percent of these servers are virtualized. The iSCSI arrays have 14 drives, some 250 GB and others 760 GB, with RAID 5+0 running. Adding more RAM and another processor didn’t address the sluggish performance being experienced. A fragmentation scan revealed very high levels present. Virtual systems ran much better after a defrag was performed on the servers. User complaints about performance ceased.

Synectics Group, of Allentown, Penn., takes a different tack. It runs defragmentation programs directly inside VMs stored within a 4 TB Dell EqualLogic SAN. This VMware environment includes 43 Windows servers. However, performance on the virtual machines was slowly deteriorating over time.

“The virtual machines all have Diskeeper on them because the applications just run faster when the VM is defragmented,” said Kenneth Bucci, a technical support specialist at Synectics. “If we don’t defrag, things come to screeching halt.”

He explained that there is a multi-tiered issue at work with regard to fragmentation of hosts and guests. A virtual machine on a disk is a file on a host machine. If you configure your virtual machines to consume the space as needed, you could see fragmentation on the host computers or SANs because of how the host OS consumes the space.

“The VM itself running Window in such a file will fragment because of how Windows stores files inherent to Windows itself,” said Bucci. “It is imperative to perform defragmentation, or before too long any VM will have issues with fragmentation.”

For those running virtual systems, then, there are several points to take care of:

  • Pre-allocate the size of VMs if possible as this minimizes fragmentation of the virtual disks
  • Create logical partitions on the host system for each virtual system
  • Defragment both the servers and the VMs themselves to take care of multi-tiered fragmentation.

Drew Robb is a freelance writer specializing in technology and engineering. Currently living in California, he was originally from Scotland where he received a degree in Geology/Geography from the University of Strathcyle. He is the author of Server Disk Management in a Windows Environment (CRC Press).

Follow ServerWatch on Twitter

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories