Windows Vista Forums

Defrag inside a VM. Would there be any point?

  1. #1


    d d Guest

    Defrag inside a VM. Would there be any point?

    Would it help a VM if you were to run Defrag inside it? It's only a
    virtual hard drive, but presumably it has the potential to fragment
    itself within.

      My System SpecsSystem Spec

  2.   


  3. #2


    Mark Rae [MVP] Guest

    Re: Defrag inside a VM. Would there be any point?

    "d d" <go_on_try_and_sp@xxxxxx_me.com> wrote in message
    news:O3NHG%233RJHA.1164@xxxxxx

    > Would it help a VM if you were to run Defrag inside it?
    As much as it would help any other machine, whether physical or virtual...

    > It's only a virtual hard drive,
    Not as far as the operating system running on it is concerned, which has not
    the slightest idea that it's running in a virtual machine...

    > but presumably it has the potential to fragment itself within.
    Correct.


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net


      My System SpecsSystem Spec

  4. #3


    d d Guest

    Re: Defrag inside a VM. Would there be any point?

    Mark Rae [MVP] wrote:

    > "d d" <go_on_try_and_sp@xxxxxx_me.com> wrote in message
    > news:O3NHG%233RJHA.1164@xxxxxx
    >

    >> Would it help a VM if you were to run Defrag inside it?
    >
    > As much as it would help any other machine, whether physical or virtual...
    >

    >> It's only a virtual hard drive,
    >
    > Not as far as the operating system running on it is concerned, which has
    > not the slightest idea that it's running in a virtual machine...
    >

    >> but presumably it has the potential to fragment itself within.
    >
    > Correct.
    Thanks Mark. I thought it would help but considered there might be some
    reason I'd overlooked why it would be a ridiculous idea :-)

      My System SpecsSystem Spec

  5. #4


    Mark Rae [MVP] Guest

    Re: Defrag inside a VM. Would there be any point?

    "d d" <go_on_try_and_sp@xxxxxx_me.com> wrote in message
    news:%23ZuM%23K4RJHA.4680@xxxxxx

    > Thanks Mark. I thought it would help but considered there might be some
    > reason I'd overlooked why it would be a ridiculous idea :-)
    Generally speaking, whenever you have a VPC question, the answer is almost
    always "what if this were a physical machine?". As mentioned, the software
    (both operating system and applications) you install on a VM has not the
    slightest idea that it's not running on a physical machine - it has no need
    to know this, because it makes absolutely no difference.

    Just consider every virtual machine as functionally equivalent to a
    low-specification physical machine, and you'll not go far wrong.

    Also: http://vpc.visualwin.com/ngfaq.aspx


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net


      My System SpecsSystem Spec

  6. #5


    Richard Urban Guest

    Re: Defrag inside a VM. Would there be any point?

    If you do a lot of install/uninstall of programs for testing purposes the VM
    (physical size on disk) seems to grow in size. To solve for this condition
    you need to empty the recycle bin (or use CCleaner to get out the crud) and
    then defragment. You can then prepare the VM for compaction (use the virtual
    disk precompactor from with VM Additions).

    After you close down the VM you can use the Virtual Disk Wizard to compact
    the VM. I have seen the physical size of the VM decrease by 2-4 gig in
    physical size and the aftermath is that the VM seems a bit more responsive
    when I again use that particular VM.

    --

    Richard Urban
    Microsoft MVP
    Windows Desktop Experience


    "d d" <go_on_try_and_sp@xxxxxx_me.com> wrote in message
    news:O3NHG%233RJHA.1164@xxxxxx

    > Would it help a VM if you were to run Defrag inside it? It's only a
    > virtual hard drive, but presumably it has the potential to fragment itself
    > within.

      My System SpecsSystem Spec

  7. #6


    DevilsPGD Guest

    Re: Defrag inside a VM. Would there be any point?

    In message <#6xpEh4RJHA.2268@xxxxxx> "Mark Rae [MVP]"
    <mark@xxxxxx> was claimed to have wrote:

    >"d d" <go_on_try_and_sp@xxxxxx_me.com> wrote in message
    >news:%23ZuM%23K4RJHA.4680@xxxxxx
    >

    >> Thanks Mark. I thought it would help but considered there might be some
    >> reason I'd overlooked why it would be a ridiculous idea :-)
    >
    >Generally speaking, whenever you have a VPC question, the answer is almost
    >always "what if this were a physical machine?". As mentioned, the software
    >(both operating system and applications) you install on a VM has not the
    >slightest idea that it's not running on a physical machine - it has no need
    >to know this, because it makes absolutely no difference.
    >
    >Just consider every virtual machine as functionally equivalent to a
    >low-specification physical machine, and you'll not go far wrong.
    True, but there is a little more to the defragmentation picture.
    Defragmenting in the guest alone is worthless if the VHD file on the
    host is fragmented as the physical heads will still need to seek for a
    consecutive read.

    To have an effect you must defragment within the guest first, then if
    you're using an expanding VHD rather then a fixed size compact, then
    finally defragment at least that one VHD file if not the entire drive.

    As much as many questions start with "what if this were a physical
    machine", you have to remember that you're combining the limitations of
    the physical machine with the overhead of a virtual environment.

    That being said, I would highly recommend defragmenting VMs, the
    performance improvement can be staggering especially if you're on a
    slower hard drive (a laptop, for example)

      My System SpecsSystem Spec

  8. #7


    Melelina Guest

    Re: Defrag inside a VM. Would there be any point?


    "d d" <go_on_try_and_sp@xxxxxx_me.com> wrote in message
    news:O3NHG%233RJHA.1164@xxxxxx

    > Would it help a VM if you were to run Defrag inside it? It's only a
    > virtual hard drive, but presumably it has the potential to fragment itself
    > within.
    It doesn't know that it is a virtual machine so, of course, it needs
    defragging. I didn't realize though that VPC won't tell you when to defrag?
    VMWare Workstation pops up a notice when you need to defrag. XP only needs
    defragging about two-three times a year and I would assume Vista is about
    the same. (Nothing like 98SE)!



      My System SpecsSystem Spec

  9. #8


    Mark Rae [MVP] Guest

    Re: Defrag inside a VM. Would there be any point?

    "DevilsPGD" <spam_narf_spam@xxxxxx> wrote in message
    news:t461i4dio980l66ufjtjgmvc7l9uj8khqd@xxxxxx

    >> Just consider every virtual machine as functionally equivalent to a
    >> low-specification physical machine, and you'll not go far wrong.
    >
    > True, but there is a little more to the defragmentation picture.
    > Defragmenting in the guest alone is worthless if the VHD file on the
    > host is fragmented as the physical heads will still need to seek for a
    > consecutive read.
    I took that as read. Surely everyone defragments their host machine on a
    regular basis, no...?

    > To have an effect you must defragment within the guest first, then if
    > you're using an expanding VHD rather then a fixed size compact, then
    > finally defragment at least that one VHD file if not the entire drive.
    Obviously.

    > As much as many questions start with "what if this were a physical
    > machine", you have to remember that you're combining the limitations of
    > the physical machine with the overhead of a virtual environment.
    Indeed.

    > That being said, I would highly recommend defragmenting VMs, the
    > performance improvement can be staggering especially if you're on a
    > slower hard drive (a laptop, for example)
    Glad to hear it...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net


      My System SpecsSystem Spec

  10. #9


    DevilsPGD Guest

    Re: Defrag inside a VM. Would there be any point?

    In message <uz7btzESJHA.4772@xxxxxx> "Mark Rae [MVP]"
    <mark@xxxxxx> was claimed to have wrote:

    >"DevilsPGD" <spam_narf_spam@xxxxxx> wrote in message
    >news:t461i4dio980l66ufjtjgmvc7l9uj8khqd@xxxxxx
    >

    >>> Just consider every virtual machine as functionally equivalent to a
    >>> low-specification physical machine, and you'll not go far wrong.
    >>
    >> True, but there is a little more to the defragmentation picture.
    >> Defragmenting in the guest alone is worthless if the VHD file on the
    >> host is fragmented as the physical heads will still need to seek for a
    >> consecutive read.
    >
    >I took that as read. Surely everyone defragments their host machine on a
    >regular basis, no...?
    Prior to Vista, no, at least not if my consulting experience is of any
    indicator. You'll get a few whiz kid types that like to maintain their
    own systems and defragment compulsively, a few that remember they're
    supposed to defragment but don't get around to it more then a handful of
    times per year and the rest probably don't bother at all.

    Vista defragments automatically, which is a step in the right direction.

    To see how poorly defragmenting is understood just look around at less
    technical forums where defragmenting seems to be understood to be less
    about performance, instead you'll see "you should defragment in the
    future to avoid this" coming up in response to problems that are solved
    using chkdsk or even are as a result of bad hardware.

    >> To have an effect you must defragment within the guest first, then if
    >> you're using an expanding VHD rather then a fixed size compact, then
    >> finally defragment at least that one VHD file if not the entire drive.
    >
    >Obviously.
    Well, obvious if you know how VHDs work. Of course those who know much
    about the internal structure of a VHD probably know the answer to the
    original question that started this thread anyway.

    The reason I mention compacting too is that without compacting,
    defragmenting inside the guest and in the host still results in
    fragmentation internal to the VHD. If the goal is to defragment you
    really need to perform all three steps and so far this thread had only
    really discussed defragmenting within the VM itself, which is the first
    step, but a borderline useless step on it's own.

      My System SpecsSystem Spec

  11. #10


    Bo Berglund Guest

    Re: Defrag inside a VM. Would there be any point?

    On Sun, 16 Nov 2008 14:26:26 -0800, DevilsPGD
    <spam_narf_spam@xxxxxx> wrote:

    >To have an effect you must defragment within the guest first, then if
    >you're using an expanding VHD rather then a fixed size compact, then
    >finally defragment at least that one VHD file if not the entire drive.
    How do you defragment a single file?
    I have never seen that option in the Windows defragmenter.

    --

    Bo Berglund (Sweden)

      My System SpecsSystem Spec

Page 1 of 3 123 LastLast

Defrag inside a VM. Would there be any point?
Similar Threads
Thread Forum
Window's won't let me create a restore point! (Pictures Inside) General Discussion
change permission on all files inside a folder or hundreds of file inside a folder Vista security
defrag comand vs defrag windows Vista General
O&O Defrag versus Microsoft Defrag in Vista Vista performance & maintenance
Restore point filling drive to point of no free space Vista performance & maintenance