Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Do you defragment your hard drive, beyond what OS X does automatically?

1/1: Do you defragment your hard drive, beyond what OS X does automatically?

Yes 181 (11.28%)
No 1,423 (88.72%)
Other polls | 1,608 votes | 22 comments

Do you defragment your hard drive, beyond what OS X does automatically? | 22 comments | Create New Account
Click here to return to the 'Do you defragment your hard drive, beyond what OS X does automatically?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
First vote!
Authored by: derekhed on Dec 10, '04 05:54:34PM


[ Reply to This | # ]
What is Fragmentation?
Authored by: rhowell on Dec 10, '04 05:59:06PM
More on fragmentation.

[ Reply to This | # ]
Most people probably don't do it, but is it even necessary?
Authored by: Makosuke on Dec 10, '04 08:07:59PM

It'll be interesting to see the results of this poll. It'd be more intresting to see a survey of whether OSX, under normal circumstances, really does benefit from defragmentation at all.

Obviously if you're capturing huge chunks of DV video to a mostly-full drive, you're going to get some fragmentation, but for the other 99% of users, I'm seriously begining to doubt that defragging is necessary at all, even though I was a weekly defrag sort of guy in the OS9 days.

To provide one data point, I checked some of my drives using the hfsdebug tool referenced above:

On most of my drives, the fragmentation was negligeble. More surprising was my worst-case-scenereo drive: one 110GB partition that has been hovering between 90% and 100% full (literally--decompression utilities failing because they'd eaten all available space) for approximately a year. It contains a mix of hundreds of small text files and dozens of ~1GB video files, plus a couple of iMovie projects in the 10GB range. It sees a LOT of activity, with hundreds of ~10MB temp files added and removed on a regular basis.

On this drive, there was some fragmentation, but only about 5 of the ~1GB files had any significant amount of fragmentation, and the drive was still over 90% unfragmented. It gets noticably slower when it is more than 98% full, but that's the only time I've seen any significant performance degradation.

Other people want to spend the time to test and report in?

[ Reply to This | # ]
Defragging matters!
Authored by: thelamecamel on Dec 10, '04 10:20:54PM

I have never defragged my slot-loading iMac (40GB), and I am suffering. I can't import more than about 15 seconds in iMovie 2 (let alone 3) without dropping frames. When the computer was new, I imported (and exported) 2 x 1 hour tapes in one go each, with no dropped frames. (that was the only time my hard drive got within 5GB of full)

I was also recently using an older, slower, but recently reformatted iMac, and was amazed at how fast it booted and how quickly applications loaded after logging in.

There aren't any free defrag utilities for mac, apart from a borrowed external harddrive, are there?

[ Reply to This | # ]
Defragging matters!
Authored by: DavidRavenMoon on Dec 14, '04 05:54:36PM

I agree. Especially for older Macs. When the drive on my G4/466 gets badly fragmented the whole computer runs very poorly.

Also when trying to work with audio files in applications such as Cubase SX, you can really see the loss of performance.

I still use Norton SpeedDisk to defrag (booting into OS 9) but it's getting long-in-the-tooth, and often has a hard time dealing with the thousands of files on a typical OS X hard drive.

The built in defragging isn't worth a hoot!

G4/466, 1 GB, Mac OS X 10.3.6

[ Reply to This | # ]
Most people probably don't do it, but is it even necessary?
Authored by: BMarsh on Dec 28, '04 02:06:12AM

I don't do it nearly as often as 10.2 or earlier (including 9, 8 and 7), but from time to time, I do end up with large files (over 20 MB) that end up quite fragmented

mostly audio & video items that I've been playing with, this is the only reason I run another defragmenter/optimizer. I would estimate I only do it once every 6 months or so at that.

[ Reply to This | # ]
does it?
Authored by: poenn on Dec 12, '04 10:15:53AM

"beyond what OS X does automatically?"

does os x really do that, i didn't think so??
as i unterstand, os x does "optimize" the disk after installing software. but i thought this would only do prebinding, not defragmenting?

can anyone explain that to me? :-)

[ Reply to This | # ]
yes it does.
Authored by: rhowell on Dec 12, '04 11:19:40AM

From the link above:

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.

Hot File Clustering

This optimization is currently available only on boot volumes. Hot File Clustering is a multi-staged clustering scheme that records "hot" files (except journal files, and ideally quota files) on a volume, and moves them to the "hot space" on the volume (0.5% of the total filesystem size located at the end of the default metadat zone, which itself is at the start of the volume). The files are also defragmented.


A defragmenting tool should not move a file into the hot file area, nor should it move a file out of the hot file area. Doing so might degrade performance!

[ Reply to This | # ]
Authored by: Ezekiel on Dec 13, '04 06:44:01AM

Actually, there could be other problems related to fragmentation. If you run with a very full disc. For further reading:

[ Reply to This | # ]
A quote
Authored by: Ezekiel on Dec 13, '04 06:51:31AM

Btw, here's a quote from the article:

"The claim that installations of Mac OS X on HFS+ volumes do not fragment is a myth believed by people who do not have disk optimizers that allow them to see how much fragmentation their disks have. It is an example of ignorance that is not able to be removed by any amount of evidence. I think theologians call that "invincible ignorance." It is now a widespread form of the pollution of information space."

But the question is, does it really matter if the disc is fragmented? It's not slowing us down, that's for sure.

[ Reply to This | # ]
Back up and erase
Authored by: johnsawyercjs on Dec 14, '04 01:33:28AM

I don't know of any on-the-fly, background defragmenting utility for OS X, except OS X itself (see messages above for how this works). Alsoft has a fine background defrag util for pre-OS X, called DiskExpress Pro, but there's no OS X version--in fact, there's no HFS Plus version, even though HFS Plus was introduced with OS 8.1. For several years, Alsoft has had a running "gag" on their web site, in which they've been promising "The version that will optimize HFS Plus disks is currently under development". When OS X was released, they started promising an OS X version. Several years ago, I stopped by their booth at the San Francisco Macworld show, and asked them if they were ever really going to release an HFS Plus version. The two guys in the booth first laughed as if they'd been caught in the act, pointed at each other to try to get the other guy to answer the question, and then one of them responded that it would be available in about a half-year. That was several years ago. I'd say it's safe to say they have no plans to release this, so when you still read on their web site that it's "currently under development", well, they have an odd sense of humor.

The fastest and safest way to defrag a hard drive is to back it up to another drive (for OS X boot volumes, use any of the utilities that can create and restore a bootable backup), erase the source drive, then copy the files back to it. You'll wind up with the useful byproduct of a backup in the process. The Finder, and most backup utils, will copy files back to the erased drive in a contiguous (non-fragmented) fashion. After this, any files that you add, or existing files whose size you increase, won't stay defragged (except when OS X does it), but the rest will stay put and defragged. Defrag utils run the risk of moving just one block to the wrong location, or a power outage or a crash, and you can lose some files or even everything. This is very unlikely, but I've seen it happen--several of my clients brought drives to me years ago, where this had happened when they used various defrag utils, including early versions of DiskExpress and Norton's SpeedDisk.

However, there aren't many instances where defragging a drive, or keeping your drive defragmented, is useful:
• Some applications that frequently or constantly access one or more data files, like a graphics or movie file, may run faster when these files are defragged. If you can use a util that will defrag only specific files you select, that's best.
• When so many files on the hard drive are fragmented, that the hard drive directory's extents file is used up (it keeps track of where the blocks of fragmented files are located)--there are only a certain number of blocks allocated to the extents file, and when these blocks are all used up, new files and new blocks in existing files, begin re-using these extents blocks, resulting in "overlapping" files. This was more of a problem under pre-X--it's unlikely to happen under OS X.
• OS X's virtual memory swapfiles need to be contiguous, so if there isn't enough contiguous free space on the drive where the VM swapfiles are stored (the default is the startup volume, unless you've messed with the prefs using a utility that lets you), there may be extra disk thrashing while OS X moves blocks around until it creates enough contiguous free space for the VM files. However, as I understand it, OS X handles this task fairly well, so that once it clears up some space, that space is available for a while for swapfiles, until it has to be done again (somebody enlighten me if I'm wrong).
• Some print spool operations may be faster, but this may be limited to specific types and/or sizes of documents.

[ Reply to This | # ]
Back up and erase
Authored by: bdjones on Dec 16, '04 11:18:42AM

Intech Software Speed Tools has a disk defragmenter as part of it's suite. Works with 10.3.x

[ Reply to This | # ]
Back up and erase
Authored by: johnsawyercjs on Dec 20, '04 12:41:27AM

Yes, but doesn't it require that you launch the Intech utility to start the defrag process? I don't think it operates on the fly, in the background. If it allows you to do other things while it's running, that would be close to the same, but not quite.

[ Reply to This | # ]
Back up and erase
Authored by: ericdano on Dec 28, '04 12:07:50AM

No, it doesn't run on the Fly, but it does a good job defragmenting drives. I use it a lot to defragment my Audio drive for recording. It's a great little tool.

[ Reply to This | # ]
More of an issue with big files or old drive
Authored by: Makosuke on Dec 14, '04 09:46:58PM

It's worth noting that older computers are on average going to be more prone to fragmentation, due to their smaller disks (the lower RAM may mean more swapfiles as well, depending on what you're doing). Plus, of course, on a pokey computer every little bit helps.

And yes, OSX's defragmentation works great for small files. It's worthless for big ones, which of course are the most likely to fragment if you do a lot of video capture or heavy sound work since that's also the time you're most likely to fill your drive.

The point I was trying to make, though--that 99% of people don't push around multi-gigabyte files with their disks almost full--still stands.

[ Reply to This | # ]
Periodic defrag...
Authored by: jesboat on Dec 18, '04 08:29:47AM

Every 6 months, except I usually call it something else: repartitioning. Including a backup to external drive, restore, and, more often than not, getting a logic board problem fixed.

With no walls or fences on the 'net, who needs Windows or Gates?

[ Reply to This | # ]
Authored by: sjk on Dec 20, '04 11:22:17PM
Coriolis Systems has released iDefrag. Maybe Rob can do a review in followup to his recent one of iPartition.

[ Reply to This | # ]
bad habit from the old days
Authored by: LWB on Dec 24, '04 09:20:32AM

been trying to stop myself from defragging/optimizing with partial success! it's one of those things stuck from the past... like why we all use qwerty keyboards (which was originally designed to slow typing speed down!) instead of the more efficient dvorak layout...

so far, managed to stop myself from optimizing... i think sucessful cessation of defragmentation will take time... =)

merry x'mas all!

[ Reply to This | # ]
urban legend
Authored by: SeanAhern on Dec 26, '04 11:14:49PM
like why we all use qwerty keyboards (which was originally designed to slow typing speed down!) instead of the more efficient dvorak layout...

Sorry, that's an urban legend.

Turns out that, when tested, the speed and efficiency of qwerty and dvorak layouts are about the same. The reason the keys were layed out in the way they are on a qwerty keyboard was to help the keys from striking each other in early typwriters. Apparently, most english words can be typed using alternate sides of the keyboard for alternate letters in a qwerty layout. I have heard that the letters to the word "typewriter" were placed all on the top row so that salesmen could easily demonstrate their product. However, I don't know the veracity of that particular nugget.

[ Reply to This | # ]

urban-er urban legend
Authored by: LWB on Dec 27, '04 11:36:35AM

On a tangential note, I think you have gone way off IMHO (I do not intend to start flame session). Because the dvorak layout utilizes both hands with the most frequently typed characters right under the fingers, the distance one has to move the fingers is much less resulting in faster typing times. I distinctly read a study where dvorak won hands down, after 9 months of training.

If you believe that qwerty is as fast, then so be it. ;)

[ Reply to This | # ]
urban-er urban legend
Authored by: gshenaut on Dec 29, '04 10:01:23PM
I agree that this is a tangent, but I can't resist adding my 2¢.

During the time I was finishing my masters thesis, my hands were dying from too much typing, and so in an attempt to find relief, I special-ordered an electric typewriter with a Dvorak keyboard (this was in 1972). I practiced for a month or so and was astounded at how much difference it made to my hands once I became proficient with it. I could spend a whole day typing and my hands felt very relaxed, unlike what they had been like before.

BUT: shortly after that, I started using computers, and all of the terminals at my school were IBM selectrics, none of which were Dvorak. This was way before there could be any significant customizing of keyboards--I was working on an IBM 360 and was lucky to be using a terminal instead of punched cards. So, just as I was mastering the Dvorak keyboard, I was basically forced to give it up and go back to qwerty. It was at least 10 times as hard going back, plus, I also went back to the sore left hand syndrome I had avoided during those few happy months on the Dvorak. I've never gone back again--life's too short to keep changing things like that. However, while the Dvorak may not be the maximally efficient layout, in my mind there is no question that for typing English text, it is much more efficient than qwerty.

Greg Shenaut

[ Reply to This | # ]

Why waste your time? MacOSX stays on top of defrag
Authored by: September on Dec 27, '04 05:59:53AM

I have noticed that MacOS defrags itself more frequently than most people remember to do on their own. I am always running into people who ask me for help with their computer problems (Windows, of course) and when I ask them have they defragged it I get a really blank look, and these people have had their computers for years!
I used to manully optimize my Mac, in addition to what it did for itself, but cured myself of that around the 10th message coming back and saying that I had less than 10% defrag and the computer didn't need optimizing.
If it works, don't fix it! ;-)

[ Reply to This | # ]