To defrag or not?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Yeah for large files defragmentation is not really so much an issue, up to a point obviously.

It's not really an issue for any size file except for corner cases because the OS' demand paging works for most apps. Things like A/V editing that need low latency sequential streaming of a file can have big problems, but for that you really should have a dedicated scratch drive.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
One thing to keep in mind with HTPC HDs, is that they may be in the process of reading and writing at the same time...
Watching a recorded program at the same time as another program is being recorded.

Which means fragmentation has less of an affect because you're already seeking back and forth between at least 2 locations on the disk. Really, with proper read ahead and buffering on the read side and write caching on the write side you shouldn't notice any problems.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Originally posted by: Blain
One thing to keep in mind with HTPC HDs, is that they may be in the process of reading and writing at the same time...
Watching a recorded program at the same time as another program is being recorded.

does not matter.
It will only fragment if they are WRITING two or more files at the same time... AND they have a sloppy algorithm for it (most torrent programs preallocate space... and you could preallocate chunks for an HTPC)

Originally posted by: Nothinman
One thing to keep in mind with HTPC HDs, is that they may be in the process of reading and writing at the same time...
Watching a recorded program at the same time as another program is being recorded.

Which means fragmentation has less of an affect because you're already seeking back and forth between at least 2 locations on the disk. Really, with proper read ahead and buffering on the read side and write caching on the write side you shouldn't notice any problems.

That too
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
I am surprised nobody repeated the old myth of "if your fragmentation reaches 100% your drive goes boom". I can't tell you how many times people said that to me :).
 

Idontcare

Elite Member
Oct 10, 1999
21,110
64
91
I have heard from well-placed industry sources that if your fragmentation reaches 100% your drive goes boom. If anyone says differently just be aware they are betraying their own ignorance on the matter. I'd say more but I'm under NDA.



;) :p /sarcascm

I'll be here all day folks, pull up a chair :laugh:
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76

excellent article...
While I would absolutely avoid most defragmenting. I would leave the win7 and win vista defragging on.

In Windows XP, any file that is split into more than one piece is considered fragmented. Not so in Windows Vista if the fragments are large enough ? the defragmentation algorithm was changed (from Windows XP) to ignore pieces of a file that are larger than 64MB. As a result, defrag in XP and defrag in Vista will report different amounts of fragmentation on a volume. So, which one is correct? Well, before the question can be answered we must understand why defrag in Vista was changed. In Vista, we analyzed the impact of defragmentation and determined that the most significant performance gains from defrag are when pieces of files are combined into sufficiently large chunks such that the impact of disk-seek latency is not significant relative to the latency associated with sequentially reading the file. This means that there is a point after which combining fragmented pieces of files has no discernible benefit. In fact, there are actually negative consequences of doing so. For example, for defrag to combine fragments that are 64MB or larger requires significant amounts of disk I/O, which is against the principle of minimizing I/O that we discussed earlier (since it decreases total available disk bandwidth for user initiated I/O), and puts more pressure on the system to find large, contiguous blocks of free space. Here is a scenario where a certainly amount of fragmentation of data is just fine ? doing nothing to decrease this fragmentation turns out to be the right answer!

Seems microsoft finally figured it out. Overzealous pointless defragmentation actually causes harm. But, it IS possible to INTELLIGENTLY defragment in a way that benefits performance. And vista and 7 do that.

but don't bother with any manual defragmentation or defragmenting programs. Not that it is a big deal or worth your time to mess around with... just, i wouldn't bother turning it off.
 

ChaiBabbaChai

Golden Member
Dec 16, 2005
1,090
0
0
Originally posted by: Modelworks
Don't delete anything and you don't really have anything to worry about :)
I like wincontig.
The program is only 300KB or so, installs nothing, and lets you pick a folder or file to defrag. I do it for files like games or videos but not for things that change often.
http://wincontig.mdtzone.it/en/index.htm

Thanks for the recommendation
 

ChaiBabbaChai

Golden Member
Dec 16, 2005
1,090
0
0
seems like if you defrag HDD's often it wears them out faster BUT the main reason I rarely defrag is that immediately after you defrag, Windows starts throwing files all over the place. LOL
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Originally posted by: ChaiBabbaChai
seems like if you defrag HDD's often it wears them out faster BUT the main reason I rarely defrag is that immediately after you defrag, Windows starts throwing files all over the place. LOL

which is part of why the new windows defragger considers 64MB continues blocks as defragged.
 

hanspeter

Member
Nov 5, 2008
157
0
76
Lets say you have a 1GB file scattered in many pieces around the disk. It is a file you very often use. What is best... leave it in all those pieces so the harddrive needs to do extra work whenever you access it, or defrag it once and ease the harddrive's job in the future to come?
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Originally posted by: hanspeter
Lets say you have a 1GB file scattered in many pieces around the disk. It is a file you very often use. What is best... leave it in all those pieces so the harddrive needs to do extra work whenever you access it, or defrag it once and ease the harddrive's job in the future to come?

that depends on the file itself AND on the method of defragging. Bad defragging like XP's is not a good idea, it will hurt other files and is extremely wasteful.
And the "speed loss" is really negligible, so it is not worth the effort for the average home user.

The reason I said "never ever defragment" is because:
1. if you work in IT and have a very SPECIFIC scenario where defragging is good, you know it already.
2. if I said "well sometimes" most home users think they are "sometimes" when they are clearly not.
3. the majority of defragmenting software for windows does "bad defragmenting" instead of good defragging like the new vista/win7 defragger.

it is certainly NOT worth 50$ to buy a defragging software and the time and effort of configuration to get that negligible performance boost out of that single file.

Saying "defragging is good" is like saying "buying energy efficient electronics saves you money"... but take the latest ram example... going to the new DDR3 @ 1.35v instead of 1.5v saves you 15% of power consumption (according the manufacturers, lets believe them for the sake of example)... reducing it by 1 watt per 4GB of ram... That is about 1$ a year on a 24/7/365 machine... if your computer is only on 8 hours a day it saves you about 30 cents per year. Assuming samsungs estimation of their cost savings is accurate.

It could add up if you have 500 severs runnings 96GB ram each and if you go over X watts per month you have to BUILD A SECOND BUILDING to overcome the limits of electricity per building. But it isn't exactly a "money saver" for a home user. EVER.

People rushing to buy "power saving ram" and paying 20$ premium for it are gonna waste about 19$ after cost savings for the entire life of the device are accounted for.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
this is how *nix has been doing it forever.

Huh? Every filesystem does it differently.

Lets say you have a 1GB file scattered in many pieces around the disk. It is a file you very often use. What is best... leave it in all those pieces so the harddrive needs to do extra work whenever you access it, or defrag it once and ease the harddrive's job in the future to come?

Depends on what kind of file it is. If it's a file that you read sequentially often then it might be good idea, but if it's something that's accessed randomly then it probably won't matter much.

it is certainly NOT worth 50$ to buy a defragging software and the time and effort of configuration to get that negligible performance boost out of that single file.

This.

And you probably won't see much of a performance boost anyway. There's way too many other factors involved like OS read ahead and other I/O going on at the same time.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Originally posted by: NothinmanThere's way too many other factors involved like OS read ahead and other I/O going on at the same time.

I love my windows turbo boost :)
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
I think the worst situation I have ever seen was a game directory I had that was comprised of about 6 data files of about 1GB each, each file had 600+ fragments.
Shows what torrents can do :)
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Originally posted by: Modelworks
I think the worst situation I have ever seen was a game directory I had that was comprised of about 6 data files of about 1GB each, each file had 600+ fragments.
Shows what torrents can do :)

I haven't used a torrent program that did not preallocate the space in 5 years.
even before that... And often you do things with the files like extract them, or copy them... which consolidates the data.
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
Originally posted by: taltamir
Originally posted by: Modelworks
I think the worst situation I have ever seen was a game directory I had that was comprised of about 6 data files of about 1GB each, each file had 600+ fragments.
Shows what torrents can do :)

I haven't used a torrent program that did not preallocate the space in 5 years.
even before that... And often you do things with the files like extract them, or copy them... which consolidates the data.

Then you haven't used game clients with built in torrent functions for patching.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Originally posted by: Modelworks
Originally posted by: taltamir
Originally posted by: Modelworks
I think the worst situation I have ever seen was a game directory I had that was comprised of about 6 data files of about 1GB each, each file had 600+ fragments.
Shows what torrents can do :)

I haven't used a torrent program that did not preallocate the space in 5 years.
even before that... And often you do things with the files like extract them, or copy them... which consolidates the data.

Then you haven't used game clients with built in torrent functions for patching.

Oh come on now... why do I care if my blizzard updater file is fragmented? it runs ONCE and only once... then i delete it. And it doesn't even need to run in real time, it just extracts some files...
[sarcasm]I weep at the horror of having my wow patch take 5 seconds longer to install[/sarcasm]

FURTHERMORE! Defragmenting the wow install file will take longer than the slowdown in applying the patch, by order of thousands of times longer.
 

geokilla

Platinum Member
Oct 14, 2006
2,012
3
81
I defrag like once a month or so. Sometimes when my files are really band and like really fragmented, I notice the speed difference before and after defragging. I use the Windows Disk Defragmenter. I torrent and delete and stuff, but the files are not really as fragmented as I thought it'd be, hence why I just defrag once a month now.

Oh, and defragging only takes like an hour at worst, so just do it when you're watching TV or eating dinner or sleeping.
 

zebrax2

Senior member
Nov 18, 2007
977
70
91
I choose not to defrag. Before i used to defrag using windows xp built in defragmenting program but after defraging i always noticed that my system just feels a little bit slower (maybe it has more to do with windows xp's flawed defrager?)
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
Originally posted by: taltamir
Originally posted by: Modelworks
Originally posted by: taltamir
Originally posted by: Modelworks
I think the worst situation I have ever seen was a game directory I had that was comprised of about 6 data files of about 1GB each, each file had 600+ fragments.
Shows what torrents can do :)

I haven't used a torrent program that did not preallocate the space in 5 years.
even before that... And often you do things with the files like extract them, or copy them... which consolidates the data.

Then you haven't used game clients with built in torrent functions for patching.

Oh come on now... why do I care if my blizzard updater file is fragmented? it runs ONCE and only once... then i delete it. And it doesn't even need to run in real time, it just extracts some files...
[sarcasm]I weep at the horror of having my wow patch take 5 seconds longer to install[/sarcasm]

FURTHERMORE! Defragmenting the wow install file will take longer than the slowdown in applying the patch, by order of thousands of times longer.

I don't play WOW so I wouldn't know.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
than why did you bring it up? or are you telling me there is ANOTHER company other than blizzard that uses a torrent to update their games?
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
Originally posted by: taltamir
than why did you bring it up? or are you telling me there is ANOTHER company other than blizzard that uses a torrent to update their games?

Many of them.
Warhammer for instance.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
irrelevent. the exact same thing applies. Nobody defragments their warhammer patch before installing it. It is a simple process of download-install-delete.
Defragmenting it is stupid
 

ilkhan

Golden Member
Jul 21, 2006
1,117
1
0
Originally posted by: taltamir
irrelevent. the exact same thing applies. Nobody defragments their warhammer patch before installing it. It is a simple process of download-install-delete.
Defragmenting it is stupid
Or download-install-archive. ;)
Regardless, unless you are running an SSD defragging has no downsides. And as mentioned vista/7 will do it for you while idle if you leave the comp on.