What does a de-frag do to my computer?

I was wondering.

It compacts your entire hard-drive. VERY worthwile. Infact you’ve made me want to do it now…lol (thanks for reminding)

fauxpas, that answer is more or less incomplete. I’ll fill in the gaps.

`Defragmenting’ does what it says: It moves all of the used sectors of a drive into one continuous block, helping the drive find things faster because it doesn’t have to seek around to either find an oddly-placed sector with the information you want, or to find an oddly-placed sector that’s actually empty.

I think, but I am not sure, that defragmenting is only needed with some file systems. The FAT filesystems (FAT16 and FAT32) need it, but I doubt Linux’s ext2 does, and I don’t know about Windows NT’s NTFS.

All file systems do eventually need to be defragmented, it’s just that some fragment more readily than others. NTFS fragments MUCH more slowly than FAT, but the performance degradation from advanced fragmentation can be much more severe. My O’Reilly Guide to UNIX Systems Administration book had a section on defragmenting the ext2 filesystem, the suggested method was to backup the data, reformat the partition, and then restore:)

Yep. ext2 (and NTFS, I’d assume, though I don’t know) doesn’t try to write everything in the first available blocks of space, the way FAT* filesystems do. Instead, it tries to store the whole file continuously, based on its length. This can lead to fragmentation, of course, when you go back and add to a file with no space after it. However, in my experience, my heavily-used (lots of saves and erases) /home and /tmp partitions have yet to exceed 3% fragmentation. This makes it much less necessary to ever do anything about it. Unix filesystems in general, however, are tough to defragment, because of the way they save file meta-information - the superblock/inode/pointer structure is a lot tougher to completely overwrite and replace than a FAT table. In practice, FDISK’s method is how you do it.

I’d argue that you have to run a defrag a lot less now than you did a decade or more ago, when you had those tiny hard drives and older filesystems. I’ve defragged my computer once since I bought it two years ago with all the writing and overwriting I do.
The joking answer, of course, is that it resurrects all the fragged bots that remain on your hard drive after you’re finished killing them in UT or some other game of your choice.

No has answered the OP yet:

A large enough file (depending on your cluster size) might have to broken into two or more pieces on the drive. If these pieces are one after the other then everything is groovy. Accessing the file is fast since the head doesn’t have to move much (if at all) to access the file from front to back. If the pieces are not next to each other though, the head of the drive has to zip back and forth all over the place to get to each piece. (And wait for the disk to spin underneath the head too.) That eats up a lot more time. Such a split apart file is called “fragmented”. Defragging means that all the file pieces are put into the right order, one after another, for each file.

Note that defragging does not mean putting used and unused clusters together. That is just an added feature of defraggers that helps slow down future fragmentation.

How often you need to do a defrag depends on your file usage. If you don’t change your files much or the files you change are tiny, then no problem. Otherwise, it’s a good idea to do it every couple of months.

I have seen defrags that speed up systems by incredibly large amounts. E.g., 10 times faster to boot up.

One of my college buddies wrote a disk fragmenter as a joke. As I recall, it turned out to be a little difficult to figure out what the “optimal” fragmentation was, and he was never sure that his program made it as bad as it could get. It sure slowed his computer down, though.

asterion: How quickly your drive becomes fragmented is based on how you use it. If ten years ago you had your 120MB HDD filled to the brim, it would get fragmented fairly quickly. In contrast, if you’ve got a 20GB HDD with only 5GB in use, its not going to get very fragmented.

Derleth…its basically compacting…bascially…i know the actual terms and such…but why fill the poor guy with tenchincal slang?! Well…I guess…I should have.

*Fauxpas, your explanation was hardly detailed or even completely correct, so I don’t know why you’re complaining that someone else has added in more detail. Relax; you don’t have to answer every question if you don’t know the details (a lesson I’m still learning).

FAT16 and FAT32 do need it.
Windows NT’s NTFS does need defragmenting as well. Frustratingly, NT 3.51 and 4.0 include no defragmenter because during the development of NT Microsoft believed that NTFS would not fragment. They reversed themselves with Windows 2000 and subsequent revisions of the NT product line such as XP and included defragmenting tools.
Linux’s ext2 file system DOES fragment, but doesn’t need a 3rd-party defragmenter. The file system driver actually defrags ext2 for you in the background, so a typical ext2 partition would rarely be more than 5% fragmented.

Let me quote what Symantec’s manual states:

So, although the manual states, “Speed Disk optimizes…,” by its own definition, it really defrags the disk. It does say “optimizes fragmented files” which is really, really confusing. In any event, I’ve used Speed Disk for over a year, never done any other defragging, and my disk is always 98% or 99% defragmented.

I dunno if this has much to do with the defrag but my computer has a capacity of 3.72 GB and 917 MB not used…

Also, how much MB does a gig have in it?

1024MB = 1GB

I know. The reason I said that was because the family always seemed to have our HDDs filled to the brim. I guess it was just a bad posting of cause from memory.

In short, your computer is going to use command.com and iexplore.exe far more frequently than letterfrommom.txt, so they’re stored towards the beginning of the disk where the head can retrieve them quickly, and her letter near the end of the used area.

I did not quote Symantec’s manual as to another paragraph:

[quote]
Speed Disk also creates contiguous free space on the disk, improving system performance when you add new files. This is especially helpful under low disk space conditions where free space fragmentation can cause newly added large files to be fragmented from the start.]/quote]

So, it appears to me that Speed Disk both defrags and optimizes, but I’m not sure. Does anyone know for sure?