Back in the earlier days when the new filing systems came in, users soon became aware of the detrimental effects of fragmentation, and although a deliberate mechanical design for hard disk storage, it no less became a costly burden to system users due to the degradation and loss of computer performance. However, it was soon understood that defragmenting computers gave back the lost performance, increased system reliability, as well as increased hardware life and many companies thereon had procedures in place or took action to handle fragmentation.
Today, as companies start migrating across to virtual networks, they will find themselves in a similar situation as those early days in terms of discovering the problems caused by fragmentation – except now we see this issue in a virtual environment and this time it is thrice as bad leading to dramatic increase in IOPs.
Fragmentation on Virtual Systems
Just as fragmentation has a detrimental effect in physical windows machines, so it does in a virtual environment – In fact, up to 3 times worse! Server virtualization allows multiple operating systems to run simultaneously on a physical server – as virtual machines (VMs). Like non-virtualized systems, performance on virtual systems is degraded by disk fragmentation. The performance degradation is several times worse on virtual systems than on physical systems because fragmentation happens at different levels. To handle it correctly, all the different levels have to be accounted for.
There are three levels of virtualization that relate to a Virtual Hard Disk (VHD):
Level 1:The Virtual Hard Disk on the Guest Virtual System. From the Guest Virtual System, this looks like a normal hard disk drive.
Level 2:The Virtualization Mapping Data. This structure shows how the data on the Virtual Hard Disk is organized or placed in the Virtual Hard Disk file that resides on a physical hard disk drive.
Level 3:The Virtual Hard Disk file – when a Virtual Hard Disk(Guest) is created, a Virtual Hard Disk file is created on a physical hard disk drive that contains the data of the Virtual Hard Disk.
Fragmentation occurs at all these three levels of virtualization: on the Virtual Hard Disk on the Guest Virtual System, when mapping the Virtual Hard Disk data to the physical Virtual Hard Disk file, and on the physical Virtual Hard Disk file residing on the Host/Parent System.
How Fragmentation Occurs at Each Level
The files user's access are saved as normal files in the VHD (seen as the local disk on the Guest VM), these files are more likely to be fragmented as the underlying file system is NTFS. The logical address of these fragments are then mapped to the actual physical location on the host disk. The VHD, which is a file in essence, will also get fragmented over time on the Host disk. In short, we have fragmentation within fragmentation and in a virtual environment we need to "pass through" several layers before we touch the actual data stored on the physical disk. To add to this if these files are fragmented it would increase the delay and affect the overall performance of not only that Guest but all other Guests sharing the same Host.
The solution is to address fragmentation at all levels, if the Host is running windows, you need to defragment the host also, if the Host is UNIX based, although we have fragmentation, the detrimental effects caused by this are not very significant. www.diskeeper.de