Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Virtual PC

Vista - Defrag inside a VM. Would there be any point?

Reply
 
Old 11-15-2008   #1 (permalink)
d d


 
 

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
Old 11-15-2008   #2 (permalink)
Mark Rae [MVP]


 
 

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
Quote:

> 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...
Quote:

> 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...
Quote:

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


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

My System SpecsSystem Spec
Old 11-15-2008   #3 (permalink)
d d


 
 

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

Mark Rae [MVP] wrote:
Quote:

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

>> 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...
>
Quote:

>> 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...
>
Quote:

>> 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
Old 11-15-2008   #4 (permalink)
Mark Rae [MVP]


 
 

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
Quote:

> 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
Old 11-16-2008   #5 (permalink)
Richard Urban


 
 

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
Quote:

> 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
Old 11-16-2008   #6 (permalink)
DevilsPGD


 
 

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:
Quote:

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

>> 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
Old 11-16-2008   #7 (permalink)
Melelina


 
 

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
Quote:

> 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
Old 11-16-2008   #8 (permalink)
Mark Rae [MVP]


 
 

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

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

>> 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...?
Quote:

> 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.
Quote:

> 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.
Quote:

> 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
Old 11-16-2008   #9 (permalink)
DevilsPGD


 
 

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:
Quote:

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

>>> 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.
Quote:
Quote:

>> 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
Old 11-17-2008   #10 (permalink)
Bo Berglund


 
 

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:
Quote:

>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
Reply

Thread Tools


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 - Can You Copy XP's Defrag Files Across Vista performance & maintenance
O&O Defrag versus Microsoft Defrag in Vista Vista performance & maintenance
Restore point filling drive to point of no free space Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46