defragging a HD?

LeeTJ

Diamond Member
Jan 21, 2003
4,899
0
0
with NTFS i'm not sure anymore, but the new Defragger that comes with XP is a lot quicker than the one that used to come with Win 9x.
 

MemberSince97

Senior member
Jun 20, 2003
527
0
0
Hey Shady Sup...

Imagine a library with books alphabetized.(Defraged HD) I go over to the Unreal section of books and read, leaving the Unreal books at the reading table. I then go to Adobe, and go read Adobe at the reading table.The slob I am I leave it with Unreal at the table and go to read Quickbooks, etc.etc ... Being the lazy slob I am I get a Librarian or SpeedDisk to put my books (files) in order again(Defragged) Uhh Something like that .....At least thats how my anology is to Inquireing minds....;)
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Originally posted by: LeeTJ
with NTFS i'm not sure anymore, but the new Defragger that comes with XP is a lot quicker than the one that used to come with Win 9x.
In NTFS it does the same thing as in FAT, NTFS is just [theoretically] better about not fragmenting.

As you write, delete and write again to the HD, your files become fragmented. Let's say you have files A, B and C
They get written like so:
AAAAABBCCC
Now, you've updated the files (patch a program or edit a document), and after a few weeks, they are looking more like:
BAAACACBA
So when it goes to read, it can't just start at A and read through, it has to get the first three parts there, find that fourth one, then find the fifth one, slowing it down. Defragmenting takes the fragments and puts them back into contiguous files.

The benefit is generally faster loading and access times, since it can just go along the path from the first part of a file to the end. In reality, newer drives are getting less and less hindered by fragmentation, such that on the newer 80GB and up drives, you can hardly tell a difference after defragging.
 

LeeTJ

Diamond Member
Jan 21, 2003
4,899
0
0
Originally posted by: Cerb
Originally posted by: LeeTJ
with NTFS i'm not sure anymore, but the new Defragger that comes with XP is a lot quicker than the one that used to come with Win 9x.
In NTFS it does the same thing as in FAT, NTFS is just [theoretically] better about not fragmenting.

As you write, delete and write again to the HD, your files become fragmented. Let's say you have files A, B and C
They get written like so:
AAAAABBCCC
Now, you've updated the files (patch a program or edit a document), and after a few weeks, they are looking more like:
BAAACACBA
So when it goes to read, it can't just start at A and read through, it has to get the first three parts there, find that fourth one, then find the fifth one, slowing it down. Defragmenting takes the fragments and puts them back into contiguous files.

The benefit is generally faster loading and access times, since it can just go along the path from the first part of a file to the end. In reality, newer drives are getting less and less hindered by fragmentation, such that on the newer 80GB and up drives, you can hardly tell a difference after defragging.

isn't the better word "INDEXING"?

how is this any different than when a database Indexes?

why doesn't the OS index it's files?
 
Apr 17, 2003
37,622
0
76
so defraging puts your files in order again? which does what? reduce seek times or something? thanx for the replies all
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Originally posted by: LeeTJ
Originally posted by: Cerb
Originally posted by: LeeTJ
with NTFS i'm not sure anymore, but the new Defragger that comes with XP is a lot quicker than the one that used to come with Win 9x.
In NTFS it does the same thing as in FAT, NTFS is just [theoretically] better about not fragmenting.

As you write, delete and write again to the HD, your files become fragmented. Let's say you have files A, B and C
They get written like so:
AAAAABBCCC
Now, you've updated the files (patch a program or edit a document), and after a few weeks, they are looking more like:
BAAACACBA
So when it goes to read, it can't just start at A and read through, it has to get the first three parts there, find that fourth one, then find the fifth one, slowing it down. Defragmenting takes the fragments and puts them back into contiguous files.

The benefit is generally faster loading and access times, since it can just go along the path from the first part of a file to the end. In reality, newer drives are getting less and less hindered by fragmentation, such that on the newer 80GB and up drives, you can hardly tell a difference after defragging.

isn't the better word "INDEXING"?

how is this any different than when a database Indexes?

why doesn't the OS index it's files?
It does, but it's still kinda klunky. In addition, getting the allocation table (or whatever it really is now, I don't feel like looking it up) bits nicely indexed and tree'd for searching and getting the physical data to mimic it can be vastly different things. If they can make it work, this will be one of the good things coming with WinFS (it can't be done perfectly, but...).
 

stncttr908

Senior member
Nov 17, 2002
243
0
76
It's supposed to increase speed, but it's only really necessary for those large files, say a Q3A pak3 file or something like that. I use Speed Disk, it comes with Norton Utilities and it can do a defrag of even a horribly fragmented drive in less than 2 hours or so.
 

nowayout99

Senior member
Dec 23, 2001
232
0
76
Yes, it just reorganizes the files fragments on your 'puter by putting the pieces back together... it also places your most frequently used stuff in the fastest part of the hard drive.

While it theoretically speeds performance, we're only talking a second here or there. You may only save a "whopping" couple of minutes per year.

Nonetheless, it's generally considered good computing etiquette to defrag a system every once in a while. Each time you do it, the process gets faster.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Originally posted by: nowayout99
Yes, it just reorganizes the files fragments on your 'puter by putting the pieces back together... it also places your most frequently used stuff in the fastest part of the hard drive.

While it theoretically speeds performance, we're only talking a second here or there. You may only save a "whopping" couple of minutes per year.
...you've never loaded game maps on a mediocre hard drive before, have you...?
Good old 20-40GB 5400 Caviars and 40+ GB 7200 JBs might as well be from different worlds once you've used them for six months or so.
Nonetheless, it's generally considered good computing etiquette to defrag a system every once in a while. Each time you do it, the process gets faster.
It's getting less and less needed and less and less used. While a good thing to do, I wouldn't be suprised (and would consider it very cool) if it gradually becomes part of drivers and file systems.
 

Nebor

Lifer
Jun 24, 2003
29,582
12
76
I defragged my 2x WD 80 GB Caviar drives, which was 29% fragmented... Completed in 15 minutes. Ah, RAID 0 at it's absolute best...

Hey, considering the fact that RAID 0 splits all your files into itty bitty pieces between the drives... think about what it's doing when it defrags them... Kinda boggles your brain, eh?
 

Jittos

Guest
May 14, 2001
678
0
0
i consider defraggin very important. Havin HD as the biggest bottleneck in a computer, defraggin should help alot with the performmace... but now that people have insane amount of RAM, maybe it doesnt help that much anymore...

anywayz, if you defrag your HD frequently (like say at least once a week). the defragment process should be pretty quick coz there r less things to move around.
 

Jeff7

Lifer
Jan 4, 2001
41,596
20
81
Originally posted by: nowayout99
Yes, it just reorganizes the files fragments on your 'puter by putting the pieces back together... it also places your most frequently used stuff in the fastest part of the hard drive.

While it theoretically speeds performance, we're only talking a second here or there. You may only save a "whopping" couple of minutes per year.

Nonetheless, it's generally considered good computing etiquette to defrag a system every once in a while. Each time you do it, the process gets faster.

Depends on how badly fragmented the drive gets. If it goes 3 years or more without defragmenting (the users of the PC asked me, "What's defrag?" so I knew that was a bad thing) then you'll be looking at serious performance impact. Hard drives are not good at seeking data, because of their mechanical nature. RAM finds stuff in nanoseconds (billionths of a second). Hard drives take milliseconds (thousandths of a second). If you scatter the data all over the drive, it could take it 15 seconds to find what coud take only 2. This does of course depend on many other factors, like the size of the file, and the speed of the computer. One PC I worked with was a) BADLY fragmented, like 6 years without defrag, and it had 16MB of RAM, running Windows 95, with all kinds of background apps. Opening Internet Explorer would give you time to use the bathroom before it would come up. Just opening the defragmenter itself took about 40 seconds. This PC was a nightmare. Unfortunately, I was only at their house to work on a school project (yes, using this computer too), so there wasn't time to wait for it to defragment, which, given the state of the PC, probably would have taken a week.
Moral of the story: defragment when you think of it; once every week or two should do just fine.
 

Ravenit

Senior member
Feb 25, 2000
215
0
71
I was told regular defrags can slowly wear out a hard drive.
Say you defrag weekly your HD goes from start to finish of the complete HD.
Slowly wearing out all the parts, same thing if your HD is all messed up.
Wear and tear baby.
You have to find the sweet spot!!!!!!
Depends how much installind/deleting stuff u do.
Me I defrag say every 3 months
 

Gage8

Senior member
Feb 11, 2003
632
0
0
my WD 120GB takes forever to defrag, like 4-5 hours with speed disk. I can reinstall windows in that time so i just don't bother with it.
 

dakels

Platinum Member
Nov 20, 2002
2,809
2
0
Originally posted by: Ravenit
I was told regular defrags can slowly wear out a hard drive.
Say you defrag weekly your HD goes from start to finish of the complete HD.
Slowly wearing out all the parts, same thing if your HD is all messed up.
Wear and tear baby.
You have to find the sweet spot!!!!!!
Depends how much installind/deleting stuff u do.
Me I defrag say every 3 months
This is more of a myth then anything. While defragging does make your HD work hard for that time period, it's not more wear and tear then normal intense operation. Fragmented files on the other hand make your hard drive work alot harder then frequent defrags. When you understand how fragmentation and defragmentation works, you will understand why this statement isn't really valid.

To my knowledge, this is the scenario with disk writes and fragmentation.
When your OS goes to write data, it writes it in the first available place it can find without thinking about how large that space is. This is for the benefit of speed. Normally this data will be written in a contiguous fashion. If you have a fresh new drive, then you have one whole chunk of contiguous empty space. As you use the drive more and more and files get written and deleted by both you and the programs/OS, the placement of data and available empty spaces starts to become scattered. Your fresh and clean hard drive now looks like swiss cheese. When new data needs to be written, it will be written in the first avalable spaces without any real concern with how large that contiguous space is. When the file is too large for the contiguous space, it then break it up to fit into other spaces.


Imagine this is what a blank HD looks like, the 0 is empty sectors (spaces for data to be written):
0000000000000000000000000
you write in the file (represented here as A) that needs 12 spaces so now that space looks like:
AAAAAAAAAAAA0000000000000
No problem. It writes it contiguous because it has all the available space it needs.

Now imagine you have stuff scattered in that space. Z is part of a file, Y is part of a different file and O is the empty available spaces.
00000ZZZZZ00000YYYYY00000
Now the drive needs to write that 12 part file of yours. It will take whatever space it can find.
AAAAAZZZZZAAAAAYYYYYAA000

As you can see, the drive didnt have enough contiguous space so it wrote a part of the file, then skipped past the occupied areas to find the next space, then still needed more room and finished writing in the next available space. Now your single file is scattered in 3 different locations on your hard drive. When the system requests that file again, it has to read in 3 different areas to grab that file, in effect tripling your seek time (it not exactly triple the time but similar). Now this is just with a fairly small file, on a lightly fragmented space. Now imagine a very heavily fragmented disk and very large file where it was written in 100 different areas of your disk. That will have a very significant impact on how fast you access that file.

When you defrag your disk, it rearranges that data into nice contiguous streams and makes the empty space in the end in a nice big chunk. That way any new data that has to be written will always get a contiguous space.

So that fragmented HD would look like this:
00000ZZZZZ00000YYYYY00000
After a rearranging defrag it will look like this:
ZZZZZYYYYY000000000000000
Now when you go to write that data it will have a nice contiguous block at the end:
ZZZZZYYYYYAAAAAAAAAAAA000

Once we understand this we can also understand why faster seek times are helpful, why multiple smaller files take longer to copy or access then a contigous large file, why more RAM is helpful, why defragmentation is important and also why defragmenting puts less overall strain on the hard disk then leaving files fragmented.

If you ever notice, grabbing a folder of many small files, takes much longer then a single large file of that same total size. This is because the many small files all need to be seeked out in different areas of the hard disk, wheras the one large file can be seeked out once, provided its not too badly fragmented. An obvious example of this would be to time how long it takes for you to copy 1,000 100k files, or just copy one large unfragmented 100mb file. The difference is huge because the small files had to be seeked out in 1,000 different locations. This doesn't mean though that it will take 1,000 times longer. That all depends on the random placement of those little files, the type of formatting, OS, and hard disk technology. Still, it's a safe bet that it will take alot longer then 1 file.

When a file is read from the hard drive, it gets put into RAM. The more RAM physical RAM you have, the more data it can store in there without having to access that HD again. Also with more RAM, the less page filing or use of virtual memory the system will need. This will significantly reduce the amount of times your hard drive needs to be accessed. Since the HD is the pretty much the slowest main part of your data "traffic flow", the less it's needed the better.

So after all this technical blabber, you can now understand how hard drives access data, what fragmentation is, what defragmentation is, and also why defragmentation helps reduce overall wear and tear of your hard drive. Still, even if your hard drive is spinning at 15k rpm (SCSI) and getting extrodinarily heavy usage (like a database server), the life expentancy difference should not be affected greatly by doing a defrag every day, or doing a defrag every month. If anything, letting the files fragment more will be more worse for wear. Still, by production standards, I am told by hard drive R&D engineers that this would be insignificant to the life span of a drive. A drive is designed to operate under the most stressful of conditions and that poor production and physical conditions (like vibrations and extreme heat) are more a cause for drive failure then anything.

This is my understanding of it all. Hope this helps.


edit: fixed the stupid em spacing of the O's