Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mcguin2000

macrumors member
Original poster
Mar 1, 2006
30
0
Just wondering, you sometimes have to use that defragmentation program in windows on a PC. Is the a Mac equivalent or don't they need it?
 
Defragmentation of smallish (under 20MB) files is handled automatically by the OS in the background, and in my personal experience, the modern MacOS is somewhat more resistant to fragmentation than Windows, so for most people (particulalry if you have a good chunk of your drive free) it's just not an issue.

But, in the event you frequently work with large files (say, a lot of video scratch files), then you could buy a 3rd party utility to defragment. To be honest, I haven't used one in years (nor needed to), but they do exist.
 
Haven't needed to defrag ever since I've switched. I love it! Haven't needed to constantly virus updates or do adware scans either! I love apple!
 
Makosuke said:
Defragmentation of smallish (under 20MB) files is handled automatically by the OS in the background, and in my personal experience, the modern MacOS is somewhat more resistant to fragmentation than Windows, so for most people (particulalry if you have a good chunk of your drive free) it's just not an issue.

But, in the event you frequently work with large files (say, a lot of video scratch files), then you could buy a 3rd party utility to defragment. To be honest, I haven't used one in years (nor needed to), but they do exist.

Early Mac OS (1985) was more resistant than Windows is now.

I've got 3rd party utilities and the wait while defragmenting isn't worth the speedup or the danger of a power outage.
 
Makosuke said:
Defragmentation of smallish (under 20MB) files is handled automatically by the OS in the background, and in my personal experience, the modern MacOS is somewhat more resistant to fragmentation than Windows, so for most people (particulalry if you have a good chunk of your drive free) it's just not an issue.

I'm not so sure about that automatic defragging. I've had clients with severely fragmented hard drives which consisted mostly of smaller, yet significant files, like photos and iTunes libraries. I've seen 40 GB hard drives with 8 GB free space and not a significant chunk of that free space contiguous.

That said, I don't recommend defragging to most people, as there are all sorts of problems which can occur, but if you do choose to use a utility, make sure your hard drive is in good shape first - no bad blocks, clean directory, no errors in the file system. Too risky otherwise.

I think the best means to defrag is by cleaning up your disk, copying it to a second drive or disk image and then cloning it back to the original drive. Again, making sure the drive is healthy first - Disk Warrior is a good cleaner for the directory. For a significantly fragmented drive, this can be much quicker and safer than using a utility, since you're creating a backup in the process.
 
bousozoku said:
Early Mac OS (1985) was more resistant than Windows is now.

I've got 3rd party utilities and the wait while defragmenting isn't worth the speedup or the danger of a power outage.
hmmmm.....
didn't know that defragging causes power outages!:confused:
 
No, what bousozoku means is that if there's a power shortage half way through Windows defragging, or you pull the plug on the computer, it will corrupt the hard disk.

We once had some work going on at our house (we have this quite often, but this was a while ago so I'll talk asthough it's very rare) and I decided (cleverly) to defrag my PC while the work was going on. Being a musician and wanting to work on all my music, I went ahead and started defragging. It got about 75% there, and then the workmen tripped a fuse. Obviously the computer went dead, but this was no problem. However, when I started it back up, it couldn't get into Windows. To cut a long story short, I lost everything on the computer!!!!!!

Now with Macs.... it's a bit different!
 
Killyp said:
No, what bousozoku means is that if there's a power shortage half way through Windows defragging, or you pull the plug on the computer, it will corrupt the hard disk.

We once had some work going on at our house (we have this quite often, but this was a while ago so I'll talk asthough it's very rare) and I decided (cleverly) to defrag my PC while the work was going on. Being a musician and wanting to work on all my music, I went ahead and started defragging. It got about 75% there, and then the workmen tripped a fuse. Obviously the computer went dead, but this was no problem. However, when I started it back up, it couldn't get into Windows. To cut a long story short, I lost everything on the computer!!!!!!

Now with Macs.... it's a bit different!

Yes, you lose everything on Macs, too. That's extremely different. I've had luck with it and recovered a volume but lost a number of files.

Depending on where it is in the process, it's more critical that the power stay on with the Mac because of the more sophisticated directory structure. FAT is reasonably simple to reconstruct.
 
yadmonkey said:
I'm not so sure about that automatic defragging. ...
When in doubt, accept Apple's word. Afterall, it made the computers.
yadmonkey said:
... Disk Warrior is a good cleaner for the directory. ....
Disk Warrior does not clean directories, it repairs them.
 
Killyp said:
No, what bousozoku means is that if there's a power shortage half way through Windows defragging, or you pull the plug on the computer, it will corrupt the hard disk.

We once had some work going on at our house (we have this quite often, but this was a while ago so I'll talk asthough it's very rare) and I decided (cleverly) to defrag my PC while the work was going on. Being a musician and wanting to work on all my music, I went ahead and started defragging. It got about 75% there, and then the workmen tripped a fuse. Obviously the computer went dead, but this was no problem. However, when I started it back up, it couldn't get into Windows. To cut a long story short, I lost everything on the computer!!!!!!

Now with Macs.... it's a bit different!
Yikes. I defragged my PC a lot back in the days before I had a nice UPS. Good thing I never lost data from that!
 
You will not loose data even if the power goes. Most, if not all apps copy the data, once it has been copied and verified, it deletes the old data.

How often do you get a power outage, every 3, 4, 5 or more years?

If you do loose data, it can be recovered and fixed. You do not loose all your data. Oh no, you did manage to loose data, however you may have lost a chunk that stores two fonts, not the end of the world is it?

I'd love to work out the odds of while defragmenting, having a power cut and then loosing some data. It may have more odds of myself winning the lottery and then getting run over by a rhino.
 
howesey said:
You will not loose data even if the power goes. Most, if not all apps copy the data, once it has been copied and verified, it deletes the old data.

How often do you get a power outage, every 3, 4, 5 or more years?

If you do loose data, it can be recovered and fixed. You do not loose all your data. Oh no, you did manage to loose data, however you may have lost a chunk that stores two fonts, not the end of the world is it?

I'd love to work out the odds of while defragmenting, having a power cut and then loosing some data. It may have more odds of myself winning the lottery and then getting run over by a rhino.

Are you sure about any of that?

Here in Central Floriduh, the power interruptions are quite frequent every day because of a cheap power grid that hasn't been upgraded properly, which is now serving millions more than originally intended. It's also been patched after various hurricanes.

It's one thing to have the power go out when it's writing the data to a few files. It's another thing when it's working on the catalog/directory structure. Suddenly, the data, while still there, is completely unknown and unattached and can't be recovered unless the catalog can be recovered.

With the FAT system, it's so brainless that it's easy to protect. It's also for that reason that it should be de-fragmented weekly on a busy system. Mac HFS and HFS+ use binary trees to speed up file lookup and that resists a slowdown when the drive becomes very cluttered.

So, it's not as clear as you apparently think it is.
 
Makosuke said:
Defragmentation of smallish (under 20MB) files is handled automatically by the OS in the background, and in my personal experience, the modern MacOS is somewhat more resistant to fragmentation than Windows, so for most people (particulalry if you have a good chunk of your drive free) it's just not an issue.

But, in the event you frequently work with large files (say, a lot of video scratch files), then you could buy a 3rd party utility to defragment. To be honest, I haven't used one in years (nor needed to), but they do exist.
But they are a total waste of money, if you need to run them (eg because you free space is all fragmented) it is quicker to backup your data, reformat and reinstall the OS X. Especially as OS X doesn't require your to reinstall your applications afterwards (you can just copy them back) it's relitavely painless...
 
Eraserhead said:
if you need to run them (eg because you free space is all fragmented) it is quicker to backup your data, reformat and reinstall the OS X. Especially as OS X doesn't require your to reinstall your applications afterwards (you can just copy them back) it's relitavely painless...
Even better...try using CCC.
 
howesey said:
How often do you get a power outage, every 3, 4, 5 or more years?
Must be nice to live places like New York where a 4-hour blackout makes the national news, and you think power outages only occurr every few years.

My power was out for THREE DAYS after a storm this January, and it was a week before my parents house a few miles away got power. Then there was a two week blackout about eight years ago. And it isn't just storms--ignoring the occasional rolling blackout during the summer, the power flicks out for no reason whatsoever several times a year when somebody at PG&E falls asleep on a switch or something.

Not saying that there's a high chance of the grid going down while defragging, and I have a UPS personally, but it's not a "once in a blue moon" sort of thing, and there are those with far worse power grids than I have.
 
MisterMe said:
When in doubt, accept Apple's word. Afterall, it made the computers.

Are you being sarcastic? OS X does not defrag in the background, contrary to popular myth. Read the official Apple article. They don't claim anything about automatic defragging, keeping in mind that "Hot-File-Adaptive-Clustering" doesn't apply to files which don't "grow". They caution against it, which I think is wise on their part.

MisterMe said:
Disk Warrior does not clean directories, it repairs them.

Not sure why you're getting into semantics. No, it does not clean a directory. Yes, it repairs them when possible. However, I fail to see why using the word clean warranted correction.
 
yadmonkey said:
Are you being sarcastic? OS X does not defrag in the background, contrary to popular myth. Read the official Apple article. They don't claim anything about automatic defragging, keeping in mind that "Hot-File-Adaptive-Clustering" doesn't apply to files which don't "grow". They caution against it, which I think is wise on their part.

Apple seems to say otherwise.

Apple said:
Most files on a disk are rarely, if ever, accessed. Most frequently accessed (hot) files are small. To improve performance of these small, frequently access files, they are moved near the volume's metadata, into the metadata zone. This reduces seek times for most accesses. As files are moved into the metadata zone, they are also defragmented (allocated in a single extent), which further improves performance. This process is known as adaptive hot file clustering.
 
Right, but this still isn't the same as "defragging in the background". This hot-adaptive thingy happens when you access files and won't defrag fragmented files which aren't being accessed.

Regardless, my only and original point was that it is not always sufficient. I've seen plenty of severely fragmented drives running OS X with as much as 20% free disk space.
 
yadmonkey said:
I'm not so sure about that automatic defragging. I've had clients with severely fragmented hard drives which consisted mostly of smaller, yet significant files, like photos and iTunes libraries. I've seen 40 GB hard drives with 8 GB free space and not a significant chunk of that free space contiguous.

That said, I don't recommend defragging to most people, as there are all sorts of problems which can occur, but if you do choose to use a utility, make sure your hard drive is in good shape first - no bad blocks, clean directory, no errors in the file system. Too risky otherwise.

I think the best means to defrag is by cleaning up your disk, copying it to a second drive or disk image and then cloning it back to the original drive. Again, making sure the drive is healthy first - Disk Warrior is a good cleaner for the directory. For a significantly fragmented drive, this can be much quicker and safer than using a utility, since you're creating a backup in the process.

Won't cloning and restoring a fragmented drive result in a fragmented drive? Or perhaps I don't understand what you mean by "cleaning up your disk." By "clean," do you mean "defrag"?
 
Val-kyrie said:
Won't cloning and restoring a fragmented drive result in a fragmented drive? Or perhaps I don't understand what you mean by "cleaning up your disk." By "clean," do you mean "defrag"?
No. The clone operation copies the files one at a time, which in turn defragments them if the destination drive is empty to start with. Cloning back and forth has always been the most "surefire" way of defragging a drive (though it technically doesn't allow you to put the most heavily accessed files in the fastest portion of the disk... but as said, if they're small, the MacOS does that for you anyway). It's also a moderate hassle, and if you're cloning a boot partition, it can cause annoyances when you have to reset a couple of things depending on how you clone.

That is, however, why I keep most of my "heavy use" data on a seperate partition from my OS--that way when I repeatedly create and delete huge scratch files, if I'm fragmenting the drive at least it's not my OS partition so it won't affect the speed of anything but those files. Also makes bootable backup clones easier, since there isn't as much data to clone.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.