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

howesey

macrumors 6502a
Original poster
Dec 3, 2005
535
0
Just thought I'd have a look to see how badly fragmented my four week old iMac HDD actually is. I downloaded the demo of iDefrag, did a scan and 64% of the HDD is fragmented, some files over 11,000 fragments, 102GBs used.

iDefrag I have to pay for, and it will not defrag mounted drives. Which means that the HDD in my iMac cannot be dismounted as it has to be mounted in order to load the OS (I have no other HDD to attach).

So, anyone know of any FREE utils, or anything such a s a command line that will derag my HDD?
 
Do you think fragmenting is making an actual performance difference in your use of the Mac? If not or if it is very minor, I wouldn't bother doing anything to the disk.

If you think you have to defrag, you can always do it without a utility program by backing up all of your data (which you already do regularly, right?), reformatting the disk, doing a fresh install of Mac OS X and your applications, and then restoring your data from the backup. I've done this a couple of times over the years for other reasons (e.g., a new disk), and a side effect of the process is that almost all fragmenting is eliminated.
 
Cant you just boot from the install cds/dvds (hold down the "C" key at start up with the aforesaid cd/dvd in the drive) and operate the defrag from there? I guess the problem would be accessing the idefrag program. Maybe you could burn that on to a disc and if you have another cd drive load it up on that. Just a thought, not sure if it will work.
 
I wonder if the demo makes the disk look more fragmented than it is so that you purchase the full working copy...

Fragmentation on the Mac is not a problem for the average user because files under 25MB (the majority) get fragmented on the go. People who work with large files and have little disk space left should worry a little about fragmentation but I'd argue it's still insignificant. :)
 
mad jew said:
I wonder if the demo makes the disk look more fragmented than it is so that you purchase the full working copy...

This reminds me... there was some vacuum company that claimed that if you switched to their vacuum cleaner, you could vacuum three bags full of dirt and dust from a typical house that the previous vacuum cleaner had missed. Of course, my friend bought one and it took him six months of regular use to fill his first bag. :rolleyes:

I'm curious, but... well... I dunno. Interesting.
 
If you're going to buy a disc utility, I'd go for Disc Warrior which includes
a full system diagnostic test and disk de-fragmentation.

The best solution is to have a secondary drive either internal or external for
back-ups and maintenance.
 
Disk Warrior doesn't de-fragment, it rebuilds directories (and does a damn fine job of it.) TechTool Pro defrags, but takes a while. Intech SpeedTools is faster, but doesn't do as much stuff.

As for the "myth", I've never heard anyone claim that OS X can't cause fragmentation, only that it's less affected by it.

And just what the hell are you doing to that drive? 4 weeks, and 64% of the files are fragmented? :eek: You might want to consider getting an external drive if you're constantly hitting the drive size limit. I checked my boot drive with Intech's utility and TTP4 just now. Intech reports 0.59% of files as fragmented, 1910 with a fragmented fork, and 323 with a non-sequential fork. TTP4 reports 2880 fragmented files, with 32,431 file fragments, and 29,275 disk fragments. The biggest number I see with iDefrag (except for Catalog under Volume Directory) is 0.6% in Resource Forks under Volume Contents. Check with another utility (SpeedTools comes free with most, if not all OWC FireWire drives).
 
After G said:
Don't worry about it unless your computer feels slow.


That's it. Defragging is the Windows answer to repairing permissions. It's the first thing people do when something isn't quite right but it rarely helps to do it so often (although repairing permissions is admittedly slightly more useful).
 
Not certain but..

Counterfit said:
As for the "myth", I've never heard anyone claim that OS X can't cause fragmentation, only that it's less affected by it.

.. I'm almost sure I read this "myth" on Apple's own site!
 
mad jew said:
That's it. Defragging is the Windows answer to repairing permissions. It's the first thing people do when something isn't quite right but it rarely helps to do it so often (although repairing permissions is admittedly slightly more useful).
LOL! I've been a PC person since 1983 (still am) and so as a Mac newbie, it seems bizarro to me when people always suggest repairing permissions.

Defragging on Windows definitely won't make any non-performance problems go away.
 
cwerdna said:
LOL! I've been a PC person since 1983 (still am) and so as a Mac newbie, it seems bizarro to me when people always suggest repairing permissions.

Defragging on Windows definitely won't make any non-performance problems go away.

Repairing permissions and defragging are 2 completely unrelated tasks.
 
Yeah, repairing permissions and defragging are completely different in terms of what they achieve but the similarity lies in the fact that users see them both as the first approach to troubleshooting when in fact they both have very little effect in most cases. This applies more to defragging than repairing permissions (which can actually be very beneficial sometimes), so I acknowledge it's not the greatest analogy. :eek:
 
howesey said:
Just thought I'd have a look to see how badly fragmented my four week old iMac HDD actually is. I downloaded the demo of iDefrag, did a scan and 64% of the HDD is fragmented, some files over 11,000 fragments, 102GBs used.

iDefrag I have to pay for, and it will not defrag mounted drives. Which means that the HDD in my iMac cannot be dismounted as it has to be mounted in order to load the OS (I have no other HDD to attach).

So, anyone know of any FREE utils, or anything such a s a command line that will derag my HDD?

Consider the possibility that you've been had. MacOS X _automatically_ defragments files when it opens them. Of course if I were to write a program that pretends to defragment your harddisk and charge money for it, it would report lots and lots of fragmented files. Doesn't mean there are any. Wouldn't be the first time this happens either. This goes together with anti-virus companies trying to sell you software that will protect you from non-existing Macintosh viruses.
 
mad jew said:
Fragmentation on the Mac is not a problem for the average user because files under 25MB (the majority) get fragmented on the go. People who work with large files and have little disk space left should worry a little about fragmentation but I'd argue it's still insignificant. :)

And if you have a nearly full harddisk, then the question is: How much do you trust the guys writing the defragmenting software? What will happen if you have a powercut in the middle of defragmenting? Will your harddisk still be working? I wouldn't want to find out.
 
mad jew said:
That's it. Defragging is the Windows answer to repairing permissions. It's the first thing people do when something isn't quite right but it rarely helps to do it so often (although repairing permissions is admittedly slightly more useful).
Repairing permissions does ****. It's the first thing people without a clue suggest to do, and it's also the least useful. You don't need to repair permissions before an upgrade, that is just silly, since the installer runs as root, and therefore doesn't care about permissions at all. Defragging on the other hand is quite useful, and it can speed up your system if done every 6 months or so. The fact is that files DO fragment on all hard drives, and it will give you a performance hit depending on the severity of fragmentation. more then 60% fragmented should lead to a moderate performance hit. That said, there is a reason why Mac left out any kind of defragmenting tool on OS X, and that is they don't want you to do it. It could lead to more problems then it solves, because of the way that HFS is set up. I wouldn't recommend it to Mac users. What I would recommend is putting your home directory on a seperate partition, and reformatting your Hard Drive every so often (maybe once every year or two) so that your disc won't be fragmented to hell.

There are some utilities that do a good job at defragmenting such as TechTool Pro, which was already mentioned. If you're gonna do it though, make sure that you BACK UP YOUR DATA before attempting such.
 
gnasher729 said:
Consider the possibility that you've been had. MacOS X _automatically_ defragments files when it opens them. Of course if I were to write a program that pretends to defragment your harddisk and charge money for it, it would report lots and lots of fragmented files. Doesn't mean there are any. Wouldn't be the first time this happens either. This goes together with anti-virus companies trying to sell you software that will protect you from non-existing Macintosh viruses.
Ah yes the conspiracy theory that they're out to get the suckers. I love it. While there is some truth to your statement (OS X does defragment on the fly, to an extent) what about the other 64% of the disc that is still fragmented? Yeah you could just go open up all of those files and the OS will automatically defrag those ones, but then the previous ones that you opened will start to fragment again as you go along, making an infinite loop of no progress.

Don't get me started on AV software. It is very legitimate, because a Mac computer CAN be a dorment carrier of a Windows virus, then as soon as you hook up to the network, bam! Now all the Windows PCs that are hooked up get the virus that does damage. Let's say in a hypothetical, that in real life you are immune to AIDS. Now you wouldn't mind it if somebody injected you with AIDS would you? After all, you can't get it. You'll just be a carrier that has the potential to infect everyone else. Let's be curtious to our PC buddies, and occasionally scan our Macs for viruses. ClamAV is a free AV program that is excellent, so there is no reason not to do this. Some people can't be bothered, but I don't want to be a carrier.
 
I find it much easier and safer to just back up and do a clean install. Then install all your software first (this will help reduce future fragmenting of the apps). you will never ever have a fully defrag'd computer, but there are ways to keep it to a minimum.
 
Randall said:
Repairing permissions does ****. It's the first thing people without a clue suggest to do, and it's also the least useful.

That's actually entirely false. It's the first thing that makes sense to do, as a lot of the time, it actually fixes problems. When vital system files have corrupted permissions, they can't be run or accessed properly, and when they can't be run or accessed properly, what happens? Your computer doesn't work. Let's say you lose execute permissions on Finder.app, what happens? Your computer freezes right after login. Repairing permissions usually takes less than 15 minutes, and is your best bet as a first step in fixing problems.

It's a basic logical progression of fixing your computer...if your car broke down, you would check your oil levels before stripping the engine down and rebuilding it, right?

Randall said:
Don't get me started on AV software. It is very legitimate, because a Mac computer CAN be a dorment carrier of a Windows virus, then as soon as you hook up to the network, bam! Now all the Windows PCs that are hooked up get the virus that does damage.

This is actually false too. How exactly does said virus move itself around on the network without being able to execute on the Mac? Things don't just sift off of your Mac onto other computers on the network randomly. They have to be able to run on your computer to put themselves on other computers.
 
Randall said:
Don't get me started on AV software. It is very legitimate, because a Mac computer CAN be a dorment carrier of a Windows virus, then as soon as you hook up to the network, bam! Now all the Windows PCs that are hooked up get the virus that does damage. Let's say in a hypothetical, that in real life you are immune to AIDS. Now you wouldn't mind it if somebody injected you with AIDS would you? After all, you can't get it. You'll just be a carrier that has the potential to infect everyone else. Let's be curtious to our PC buddies, and occasionally scan our Macs for viruses. ClamAV is a free AV program that is excellent, so there is no reason not to do this. Some people can't be bothered, but I don't want to be a carrier.

How can a Mac be a carrier of a PC virus in such a way that once on a network, all the PCs get it? The only way would be for the mac to have some sort of exe file that all the PC users would open. The mac can't execute PC code, so how is it going to infect other PCs over the network?
 
When the tool said "64% fragmented," what did it mean by that?

Specifically, how many HFS+ extents must a file have for it to consider the file "fragmented?" I'll bet it didn't tell you.

I wouldn't worry unless files routinely have eight or more extents. Less than that, and the extent table can be stored in the inode and doesn't have to be separately looked up. BSD's disk caching layer should take care of the rest, performance-wise (assuming you've got some spare RAM).

Really, it'd be best if you didn't proclaim "WELL-ACCEPTED FACT ABOUT BSD SYSTEMS = MYTH" without some numbers to back it up. HFS+ seems to fragment worse than UFS, but an analysis on Kernelthread a while ago didn't show any real impact.
 
cbiffle said:
Really, it'd be best if you didn't proclaim "WELL-ACCEPTED FACT ABOUT BSD SYSTEMS = MYTH" without some numbers to back it up. HFS+ seems to fragment worse than UFS, but an analysis on Kernelthread a while ago didn't show any real impact.

I guess this is begging for someone to post before/after disk-related benchmarks or something like that....
 
darkwing said:
How can a Mac be a carrier of a PC virus in such a way that once on a network, all the PCs get it? The only way would be for the mac to have some sort of exe file that all the PC users would open. The mac can't execute PC code, so how is it going to infect other PCs over the network?
C'mon, if you're sharign it on the network, then a PC user might have access to it, and contract it that way. The point is, why would you not want to remove harmful code from your Mac? Just because your Mac is immune, doesn't mean you should let it lay dorment on your HD.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.