Disk fragmetation on virtual servers

I regularly log into a Windows Server 2003 R2 machine (it is dedicated to SQL Server 2000).
According to the defrag program, the system drive C: and the two data drives are heavily fragmented (the log drive is OK).

The IT guys inform me that "it doesn't affect performance, as it is a virtual server". (Win Server 2003 is running on top of VMWare 3.5.0, build 110268).

They aren't trying to fob me off, are they? I certainly don't want to defragment 414 GB of physical files (total space 540 GB) if I don't have to!

Please can I have some informed views on this from you experts out there. TIA

Hopeful Kiwi
Mark DalleyInformation AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

A VM uses Files as virtual HD's. The contents of these files can still get fragmented and in my point of view if use a defragmenter inside that VM will still have some positive effect, although it won't give you the same boost as on a real HD.

The fact that you are on top of Vmware do not change the problem. Your files are still fragmented. And to access information the system has to get each pieces of the files. Defragment your drive could surely help performance.
But the way your VM is stored on a physical storage is also very important : RAID, nb of disk in the volume, speed of disk, ....

Mark DalleyInformation AnalystAuthor Commented:
That was my feeling too, in the absence of any hard data. On a disk, the speed (or lack of it) surely has to boil down to the amount of hard disk head movement after going through all the layers of virtualization, indirection. optimization and what not.

I have set off a standard MS defrag on the disk I care most about. It has defragged all the files and is now compacting them (what does that mean?)

I am trying to get some info from the IT dept as to the actual real hardware setup and will come back here when I know something (may not be before tomorrow, my time).


Hopeful Kiwi

The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

The head movement in the virtual disk doesn't directly translate to the hardware, so the impact of defragmentation won't have as big an effect as if it were done on real hardware.

I believe the terminology defragmenting files, means that it is putting the files into a contiguous piece (as far as that is possible), while compacting them would mean that it moves the files closer together, so you end up with more contiguous empty space towards the end of the disk (less empty space between the files).
za_mkhIT ManagerCommented:
In virtualization, defragmentation can sometimes be a two step option.
You defragment the drive inside the VM
You defragment the VMDK ...
Of course, when defragmenting the VMDK, ensure the VM is powered off!
Defragmenting the VMDK is a one off process. It all depends on how the VMDK was created. If you created a full provisioned disk (eg. 40GB) then VMware would try and normally write the file as one big contiguous file on the VMFS volume. However, you may have chosen to created Thin provisioned disk (40GB) in which case, the VMDK starts of with 2GB and grows as more data is written inside the Virtual drive. In this case, over time your VMDK will be fragmented as your VMDK is not contiguous on the VMFS volume. However once you defragment the VMDK ... it is all made contiguous, and when that it done, it never needs to be done again, until you move the VMDK to another volume.
This link give a good overview even if it is related to VMWare Fusion:
I would recommend you defrag your drives as Windows is telling you too. It will help with the performance. I think the VMDK defrag option doesn't apply to you as you use ESX which in all probably means thick disks were created!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark DalleyInformation AnalystAuthor Commented:
I have finished the Windows level defrag, FWIW, except for one massive backup device file of about 60 GB which defrag didn't want to do anything with. Who cares - it is only a backup!

I managed to speak to one of the IT guys who knew a little about the VMWare setup. They have a beefy, heavily duplexed HP SAN, and I think there is no way any VM going to be powered off for defrag or anything else, as everything is running on it. He was looking forward to going on a VMWare course (postponed due to workload) so he could get his head around it.

No more info at present but I think I am satisfied that any fragmentation that may be present isn't too much of an issue in this case.

Thanks for all the help, especially za_mkh for the detailed rundown and informative link.

Hopeful Kiwi
Vmware, as long as it isn't running on a windows host, uses filesystems that come from the *nix world, and those are much less prone to fragmentation than current m$ filesystems are. Usually you'll need a lot of time to even find a tool that defrags such filesystems. Also as already has been mentioned, the VM images are large files that typically get written in contiguous space in the first place.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.