1

I want to ask something that has been puzzling me from last few days. I will try to explain my problem as clear as I can ... I have VMWare Workstation installed in my machine. And I use one separate 100Gb drive which stores all of my virtual machines, nothing else. Now, last week I was playing with a De-fragmentation tool called "Smart Defrag" which showed me in its analysis report that my drive where I am currently storing all of my Virtual Machines has more than 80% of fragmentation !!!

Now my question is ... What will be the effect on my Guest / VM machine performance if I defrag my Host machine ... I mean this Host machine is essentially storing those virtual machines, but still dont have any direct access to what ever is stored in those machines ... so defraging the host should not cause any problem. But before proceeding, I want to hear from other people who may have met same problem.

I will really appreciate any help ...

BTW, I am using Windows 7 as Host and the guest machines I am using are Windows 2008 & 2003 & Ubuntu 10.04

THanks, Jack

2
  • It depends where your swap file is, because that file, if fragmented, may affect performance under these conditions. That said, a good defrag won't do you wrong.
    – user3463
    Jun 7, 2010 at 5:13
  • Maybe you defragment virtual drives from inside the VMs? Run your VMs and check if their drives are defragmented. If yes, then probably you don't need to defragment the whole drive.
    – Jet
    May 4, 2014 at 15:59

2 Answers 2

2

I have never encountered an issue defraging a drive that is host to a virtual machine, as virtual machines are simply a collection of files on your Windows file-system, that make up things like your virtual drivers, memory that has been stored for suspended VM's, and your snapshots.

Defraging will result in a performance gain, especially when loading a suspended VM, or reading data from your virtual disks, as the actual hard-drive will not have to seek as much to find the fragments. Its hard to say how much of a performance gain you would receive though, as it very much depends on the read speed of the drives and the size of the VM files that are being read, etc.

If you are really worried, you can always be cautious and clone each machine an a separate drive in the unlikely event the defrag process corrupts something.

1
  • On a site note, I have no idea if fragmentation on the virtual disks affects performance (for your Window's VMs, not Ubuntu). I suspect it would, but I'm sure someone can provide a more authoritative answer. Jun 7, 2010 at 5:22
0

Virtual machines are stored as files on the host machine, and depends on your virtual machine configuration (e.g. undo disk, expanding file system, etc.) fragmentation could become an issue. With modern file systems (reads: ntfs, xfs, etc.), however, fragmentation is not as significant a problem as before with FAT.

Fragmentation would prove to enhance the performance of a virtual machine. But if you ask me, I would recommend creating a flat, big, pre-allocated file for the virtual disk, which will result in no fragmentation even after extensive use. Of course where this may not be practical, periodic defragmentation can maintain performance above acceptable limits.

And yes, @Lachlan is very correct in that you should always backup before defraging a disk holding something important -- especially when you are talking about production systems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .