Separate names with a comma.
Discussion in 'Mac Basics and Help' started by ghall, Oct 14, 2006.
What does defragging do exactly? Is it supposed to speed up the system?
Suppose you have fifty megabytes of files -- say an album you rip. You rip the album and these fifty megabytes of data get loaded in a block on the hard drive, say. Then you delete song six because you hate it. Now you have a fifty megabyte block with a 4 meg hole in the middle, right? The next time you make a new file, if it's bigger than four megabytes, the system puts it after the fifty meg block. But if it's smaller, it shoves it in that hole. Because if it didn't, then you would run out of space very quickly because you were not re-using space from deleted files (and your system is constantly making and deleting files so you wouldn't practically even get to fill the drive once).
The problem with this is that each time there's a new file, the filesystem goes pecking through the space on the disk looking for a good place to put it. Which is time consuming.
In older file systems, you manually defragmented the hard drive -- that is, you ran a program that went and looked for all the fragments of space and the small files and tried to packs all the files down so that all the free space is at the end in one giant block, so that this search is not necessary and disk access is faster.
In more modern file systems like HFS, this is done on the fly for most files. You can read about this here. So for most users, going and running a defrag program won't help much. But if you want, why not? Knock yourself out.
if i'm not incorrect, doesnt os x defrag your HD on the fly for you?
therefore, i dont think you need to worry about anything
I don't think so, because I scaned my HD and it had some major defragmentation, and I mean MAJOR!
Wouldn't that mean your hard drive was majorly not fragmented, and thus in need of no defragging?
just what did you scan you drive with to see it fragmented? Apples journaled file system takes care of it self, the only disk tool you have is "repair permissions" as far as I know
Apple takes care of defragging small files but if you constantly work with things like movie files or even large pictures or large music files you probably should do a defrag.
i don't know the exact file sizes, but a google search should reveal the specifics. defragging, contrary to many OSX users' belief, is not always unnecessary.
I used iDefrag. It's a pretty nice program. http://coriolis-systems.com/iDefrag.php
The OS automatically defrags commonly used files under 25MB or so (last time I checked anyway).
No and yes. It needs less defragmenting because of the way HFS allocates space, but it still defrags on the fly.
Third party defrag apps may give the impression that a drive is more fragmented than it actually is because the developers want you to use (and possibly buy) their app. I'm not saying this as a rule, just something to be wary of.
does my imac come with a defragmenter?
No, and you should never blight your iMac by getting one.
Here's the thing with defragging under OS X, a small group needs to do it and they really need to do it. For example, I have a friend who downloads Hi Def torrents. Torrents are by nature highly fragmented. When watching one of these HD fragmented files, there are lags and delays that disappear once the file is defragmented and all in one place.
I agree however that most users need not worry about it.
This is really interesting. I thought that when files are downloaded in general, the data was put in a temp download file until you got the whole file, and then it was re-written into a new file in order to avoid this issue. Like how Safari makes a .download file until a file is completed. So this is not quite right? Are large download files in general susceptible to fragmentation? Or is this specific to Torrent?
Torents are fragmented by nature; you are downloading bits and pieces. When you initially run the torrent (in, say, Azereus), there is a file set aside at the total size in the saved folder, so to the OS, the file is there (and usually identified as complete until you try to run it). The problem is that occasionally you get bad blocks that have to be corrected, cached duplicates, etc. It is rare that a torrent download is the same size as the specified size (in files over 100mb, at any rate). So the allocated space runs over and the bits of file are placed elsewhere.
The part that I don't buy is that OSX needs to defragment files; the way Unix filesystems work is from the tree, not the space, so there is no searching, just a list of places the heads need to go to get the bits of files. I can see, when working with HD files, it just being too much for the drive, but in general defragging is unnecessary (and as was stated before, there is some minor auto-defragging that is part of the OS; this is why most people tell you to shut down your comp the minute you accidentally delete something, as the defragger and the RAM swapping can lead to it being overwritten very, very quickly).
" On-the-fly Defragmentation
When a file is opened on an HFS+ volume, the following conditions are tested:
If the file is less than 20 MB in size
If the file is not already busy
If the file is not read-only
If the file has more than eight extents
If the system has been up for at least three minutes
If all of the above conditions are satisfied, the file is relocated -- it is defragmented on-the-fly. "
This is a great article from a guy who really knows what he's about. If you really want to defrag a mac (defragging involves some risk), I wouldn't personally use idefrag because it's been buggy in the past and uses proprietary algorithms. Drive Genius does a good job, but of all tools Disk Warrior, which rebuilds the catalogue file is speedy and makes a noticable difference.
Not always, but I don't think most users need bother with it.