Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does disk defragmenting do? 3

Status
Not open for further replies.

Aishaa

Technical User
Apr 12, 2001
90
0
0
CA
Hi - I have been told to defragment my computer once a month or so, but never really understood what it was all about.....

This is the explanation I was given: "well it kinda puts bits and pieces back where they belong that have gotten lost"
- - - - - That really made no sense to me whatsoever - - -
The only next answer that i have ever gotten is that defragmenting makes the computer run faster - is this true?

Is there any better explanation that I can read up on that uses Plain english that at least I can understand?

Ty Aishaa
 
Hi

Disk fragmentation refers to the condition of a disk in which files are divided into pieces scattered around the disk. Fragmentation occurs naturally when you use a disk frequently, creating, deleting, and modifying files. At some point, the operating system needs to store parts of a file in noncontiguous clusters. This is entirely invisible to users, but it can slow down the speed at which data is accessed because the disk drive must search through different parts of the disk to put together a single file.

Try to picture your disk as 1 long string of data.
In a perfect world it would look like this:

<file><file><file><file><file><free space>

Fragmentation makes it look like this:

<file><free space><file><free space><file><free space> etc.

Worse case :

<fi><free space><le><free space><fil><free space><e> etc.

A defrag program gathers up all the 'chunks' and puts the files back together and adjacent to each other and gathers up all the free space into 1 big chunk.

Hope this makes sense

Ed Please let me know if the sugestion(s) I provide are helpful to you.
Sometimes your the windshield... Sometimes your the bug.

 
So what happens if a computer is never defragmented versus one that is defragmented at say......once a week intervals?

Ty
Aishaa
 
Depends on the amount of fragmentation. Eventually it could have to move the heads between every cluster to load a program or data, and the load time would become noticible.
There are people that need to defrag once a week. But most don't. It depends on how you store stuff and how much you load and delete stuff. Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
If you never defragment, then over time that system will continue to fragment to 50% and beyond depending how much time we're talking and how the user uses the system.

Bottom line is that as you delete files or move them to other partitions, you are creating free space in an area inbetween other files. If you copy a file onto the hard drive afterwards that is larger than the old one that was removed, then this free space is filled and part of the file is placed at the next chunk of free space (which could be a a completely different location on the disk).

This is oversimplified of course, but the point is that you are causing large files to be separated all over the hard drive. The more time you give it, eventually the hard drive will slow to a crawl. There really is no comparison to a drive that is regularly defragmented, because that drive's performance will never degrade. You want all files to be continuous so that the head doesn't have to spin back and forth constantly just to read a couple files...
 
If you defrag on a monthly basis, that should be frequent enough.


Not fragmented:
<file1><file1><file1><file2><file2><file2><freespace>

Not fragmented, but not optimized either:
<file1><file1><file1><freespace><file2><file2><file2><freespace>

Lightly Fragmented:
<file1><file2><file2><file2><file1><file1><freespace>

Heavily Fragmented:
<file1><file2><freespace><file2><file1><file1><file2><file2><freespace>


You get the idea...
 
Wonderful - now I am starting to get the picture
Thank you........:)
Aishaa
 
Another point to note is that some sectors are marked as unmovable. This includes virtual memory allocation. Normally this is variable in size between a max and min value. Windows will allocate and retrieve it as neccessary. Unfortunately this very action fragments the virtual memory file. Performance can be enhanced by consolidating the virtual memory diskspace. Memory permitting, right click on my computer, select system properties, select performance,
select virtual memory, select let me specify my own virtual memory, Disable virtual memory. The system will request a restart. Start up in safe mode, defrag the drive, when the defrag completes, reverse the above steps and enable Virtual Memory, allow windows to manage it. Restart system in Normal mode.

regards Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top