VMware vSphere

 View Only
  • 1.  Defragment VMs, should it be done?

    Posted Apr 05, 2011 12:14 PM

    I am aware of at least two disk defragmenting solutions aimed directly at VMs (Diskeeper and Perfectdisk). Both claim increased IO and reduced latency for VMs that are defragmented. Has anyone tried these products? Is it important to defrag a VMs drives? Does running defrag on a VM affect its alignment? All of my VMs are aligned and I certainly do not want to change this.



  • 2.  RE: Defragment VMs, should it be done?

    Posted Apr 05, 2011 08:55 PM

    I can tell you that alignment is set when you first create the disk. Defragging it will not change your alignment setting unless you destroy the drive and recreate it.  Defragging will just move files within the drive.  It tries to place the same files together and remove any whitespace between files.

    I have not tried any of those products.

    Larry



  • 3.  RE: Defragment VMs, should it be done?

    Posted Apr 05, 2011 09:16 PM

    Keep in mind that If you are using Thin Provisioning for your disk, defrag will rewrite all the data in the VMDK.  This will expand the VMDK and pretty much kill any storage savings that you are getting from Thin provisioned virtual disk.



  • 4.  RE: Defragment VMs, should it be done?

    Broadcom Employee
    Posted Apr 06, 2011 02:57 PM

    also keep in mind that it is a fairly "expensive" task for the array to perform. rewriting data on different locations for multiple vms...

    Duncan

    HA/DRS technical deepdive - the ebook!



  • 5.  RE: Defragment VMs, should it be done?

    Posted Apr 06, 2011 11:55 PM

    Hi,

    VM environment aside, defragmenting in general doesn't make much sense on any RAID array, unless perhaps a two disk RAID1 mirror.

    You shouldn't be running ESXi without RAID. So defragmenting any VM doesn't make much sense.

    On a side note, I looked yesterday at an environment where every VM was scheduled to run a third party defrag product at 11am and 11pm every day. Have a guess how much that helped performance?



  • 6.  RE: Defragment VMs, should it be done?

    Posted Apr 07, 2011 05:50 PM

    Umm it didn't , it just slowed everything down to a crawl.  :smileyshocked:

    lol

    Larry



  • 7.  RE: Defragment VMs, should it be done?

    Posted Apr 08, 2011 01:47 AM

    LarryBlanco2 wrote:

    Umm it didn't , it just slowed everything down to a crawl.  :smileyshocked:

    lol

    Larry

    Try telling that to the bloke who approved the budget for twenty-odd licenses of this product.



  • 8.  RE: Defragment VMs, should it be done?

    Posted Apr 27, 2011 08:16 PM

    Windows is designed to fragment, natively. It's a tradition which goes back to VAX/VMS and was brought to MS with the engineers they get from DEC. But I don't mean to over-simpify it.

    You should contact the vendor of choice for advice on how to properly implement the solution. Running Diskeeper, for example, on a host in a busy enviornment--during the middle of the day--can be bad. But the Intelliwrite function all but eliminates the need to during the day anyway, so it becomes moot. In a thinly provisioned environment it's better to rely upon Intelliwrite lest you bloat the drive...

    Of course there's V-Locity which solves all of that. But it's not available on ESXi for another few months. But if you're running ESX 4 or 4.1, you're good to go with it.

    Ultimately, I stick with this: if you're running Windows, you're going to have problems due to fragmentation.

    I've attached a few decent papers on it but the Best Practices one spells it out the best--I think.

    Just to be clear, I do work for Diskeeper. But I think these statements would apply equally to any defragmentation product.



  • 9.  RE: Defragment VMs, should it be done?

    Posted Apr 28, 2011 01:55 PM

    We're actually investigating products to manage virtual drive fragmentation and the performace loss (over time) that gives you... For VM's would V-locity 2 or Diskeeper 2011 (server) make more sense? It almost looks like V-locity 2 will defrag the virtual drives as well as perform other tasks that are of benefit (to us and most others too)...

    Of course, we plan to evaluate/test the product(s) before making a purchase decision. I know, from experience, that you can't trust sales people to give you the full set of details every time. Sometimes they do, but I always confirm before believing (at least for the first few times)...



  • 10.  RE: Defragment VMs, should it be done?

    Posted Apr 28, 2011 02:20 PM

    Technically speaking, the biggest reason to use V-Locity instead of Diskeeper is the ability of V-Locity to balance the workload for the clients. For example, Diskeeper will look at resource usage and only defragment when it's at a low enough level that defragmenting won't affect anything important. BUT on a VM, that's not possible because it won't see what the other VMs are doing. While another one is running a backup or an image, you don't want Diskeeper defragmenting. So V-Locity would work with the local compenent to ensure it's not doing anything it shouldn't be.

    That being said, Dskeeper 2011 will do very little defragmentation, as it deals with the problem at the point of writing--at a driver level--so there's little fragmentation to clean up. It's rare that I see an environment where you need to do anything other than just use the default settings, but it does happen.

    Running Diskeeper 2011, or any defragmenter, in a virtualized environment should be done along side a manufacturer's recommended settings. It's not a big deal but, for example, defragmenting a thinly provisioned environment incorrectly can cause a lot of bloat. It's easily enough handled but it's just something to be aware of. That applies to Diskeeper, PerfectDisk, O&O etc.

    That best practices paper I attached earlier covers it well.

    Note: not only do I work for Diskeeper but I'm the director of global sales:smileyhappy: But I'm not saying anything that I wouldn't back up in a trial.And I'm also a long-time user of VMware on a personal and professional level so there's that smidge of impartiality.