# defrag with Snow Leopard



## SmudgeTheCat (Jan 5, 2008)

Hi all
Any ideas please on way to defrag in Snow Leopard. I have
Drive 10 which worked brilliantly on older OS but am hesitant to
try it with the new one. Got all the toys (Tech Tool Deluxe etc.) which
came with Applecare but there's no defrag capability.
Any help greatly appreciated.


----------



## chas_m (Dec 2, 2007)

You don't really need to defrag. This is a classic example of Windows thinking. Defragging might be one of those things you should consider doing every couple of YEARS, or perhaps before a major OS install. For 99% of Mac users, defragging any more often than that is a waste of time.

However, if you want to do it anyway, you can do so by cloning your existing hard drive to an external, testing the clone, then erasing the original drive, then clone back from the external.


----------



## HowEver (Jan 11, 2005)

Mac OSX self-optimizes. Defragging isn't necessary.


----------



## rgray (Feb 15, 2005)

chas_m said:


> You don't really need to defrag.





HowEver said:


> Defragging isn't necessary.


Uh-oh! Now you've done it! I can hear *MacDoc* coming....


----------



## eMacMan (Nov 27, 2006)

There is one exception to what has been said. IF you do a lot of movie editing then you may benefit from defragging every 6 months or so.

Otherwise if things seem to be slowing down just use Onyx to delete the Spotlight Index and walk away while it rebuilds itself. Everything else is fairly effectively handled by the OS.


----------



## Vexel (Jan 30, 2005)

From the little that I know of OSX's built in optimization... it only optimizes the files that are less than 30 or 40MB's. Everything else will not be optimized. Not just video editing falls into this category. 

I have an extensive collection of Apple Lossless files that are well over 30 or 40MB's.. or, movie files, etc.. none of these are optimized by OSX. If you're anything like me.. defragging your drive will definitely reap some benefits.. YMMV depending on your personal usage.


----------



## mac_geek (May 14, 2005)

iDefrag is Snow Leopard compatible and has previously been very favourably reviewed my others that use this site. I have no personal experience with the software, 'cause I'm too cheap.

Maybe one day I'll get it.

Coriolis Systems :: Products :: iDefrag


----------



## csonni (Feb 8, 2001)

I don't have much to say on whether to defrag or not, but I do know that my system felt much snappier after using iDefrag some time ago.


----------



## MacDoc (Nov 3, 2001)

Exactly...you should see what we see....

But you go right on swallowing Apple's reality distortion on this..

If you think this










performs as well as this










or this








as this









•••

IDefrag is the best overall tho takes time

Drive Genius does a good job but not so sophisticated.

You really have had too many servings of Job's Koolaid.

A fully optimized drive is a treat to use...a drive with files all to hell and gone?? a pain.
And you won't know the difference until you do it.


----------



## broad (Jun 2, 2009)

macdoc,

do you have any evidence on the differences between doing the online "quick" scan vs. booting from another volume and running it that way??


----------



## dongyoung (Dec 5, 2009)

I had to defrag my drive when bootcamp wouldn't let me create a partition because of fragmentation. It could be just me, but I noticed quite a performance boost after defragging my drive with iDefrag (the latest version 1.71 works flawlessly with SL).


----------



## MacDoc (Nov 3, 2001)

It's not just you. Some just don't get it...


----------



## Guest (Dec 12, 2009)

Vexel said:


> From the little that I know of OSX's built in optimization... it only optimizes the files that are less than 30 or 40MB's. Everything else will not be optimized. Not just video editing falls into this category.
> 
> I have an extensive collection of Apple Lossless files that are well over 30 or 40MB's.. or, movie files, etc.. none of these are optimized by OSX. If you're anything like me.. defragging your drive will definitely reap some benefits.. YMMV depending on your personal usage.


I think you'll find that it's the opposite of this. It only self-optimizes larger files, and only when you access them by making a fresh copy of them behind the scenes when it detects that it's fragmented -- which is not the same as actually defragging the files if the space it's copying into is fragmented too. It doesn't proactively optimize anything at all until you access it (which to me is the worst time to be killing my disk bandwidth, when I'm actually trying to use the file, nothing like having your disk churning like mad because FCP just 'touched' 20G worth of 1080p files that OSX felt it needs to optimize, but I digress). It doesn't defrag your free space or smaller files so it doesn't solve all of the problems that a real defrag does.


----------



## broad (Jun 2, 2009)

> do you have any evidence on the differences between doing the online "quick" scan vs. booting from another volume and running it that way??


??


----------



## Vexel (Jan 30, 2005)

mguertin said:


> I think you'll find that it's the opposite of this. It only self-optimizes larger files, and only when you access them by making a fresh copy of them behind the scenes when it detects that it's fragmented -- which is not the same as actually defragging the files if the space it's copying into is fragmented too. It doesn't proactively optimize anything at all until you access it (which to me is the worst time to be killing my disk bandwidth, when I'm actually trying to use the file, nothing like having your disk churning like mad because FCP just 'touched' 20G worth of 1080p files that OSX felt it needs to optimize, but I digress). It doesn't defrag your free space or smaller files so it doesn't solve all of the problems that a real defrag does.


Thanks, Mark.. that's good to know! :clap:


----------



## chas_m (Dec 2, 2007)

The problem I have with MacDoc's argument is that while defragging a fragmented hard drive may feel good, that feeling (and the performance) will last anywhere from a few hours to a few days depending on how much you actually use your computer (I use mine a lot!). Then your "perfect" HD begins to become "fragmented" again ...

It's like the old mariner's joke about how to keep your boat barnicle-free -- leave it in drydock! 

PS. it's not Apple kool-aid this time, it's UNIX kool-aid. The OS was *designed* with real world HD technology -- which includes a constant but moderate amount of fragmentation -- in mind. Mac OS X, derived from UNIX roots, does most of its own necessary self-maintenance. If you want to help it along with a defragging every now and again, be my guest -- it's your own time.

But for most users, doing it more than every year or two is probably unnecessary.


----------



## zlinger (Aug 28, 2007)

I have an 80 GB Windows VMWare Partitian, and many music/picture/movie files. I run a full defragment once in a while, and it makes a big improvement. I am not convinced the system will provide adequate maintenance.


----------



## MacDoc (Nov 3, 2001)

Chas - you are looking at it very incorrectly.
It's not fragmentation that is the direct issue tho that becomes an issue fairly frequently for largish files like spotlight once the drive turns to salt and pepper scattering of files..
It's the efficient organization of the file structures on the drive surface 
No one file in mail is fragmented BUT mail files can be scattered to hell and gone.

The problem is that few recognize the issue as the slow down is gradual...only when it beachballs do people complain.

Is it necessary - no....neither is a tuneup on your car or an oil change.
Is it a benefit - damn right.

Really good apps like iDefrag have an algorithm that puts all your key files and frequent use files in the fastest part of the drive for optimal access.
*Best $39 you can spend to get a speed bump*

Apple asks $300+ for a minor processor speed bump. Yet the same person that falls for that lets the drive slow to relative crawl because people are positing the meme that _*hey you never have to defrag a mac.*
_
*Horsepucky*.


----------



## Guest (Dec 12, 2009)

chas_m said:


> PS. it's not Apple kool-aid this time, it's UNIX kool-aid. The OS was *designed* with real world HD technology -- which includes a constant but moderate amount of fragmentation -- in mind. Mac OS X, derived from UNIX roots, does most of its own necessary self-maintenance. If you want to help it along with a defragging every now and again, be my guest -- it's your own time.


chas_m .. you're _way_ off base on this argument. This self file-optimization (I won't call it defrag because it's not, it's the equivalent of you manually copying the file yourself every time you access it and think that it might be fragmented) has nothing to do with UNIX. It's unique to OSX -- and specifically HFS+, it doesn't work in UFS, etc.

Not sure exactly what you're talking about when you say "real world HD technology"? This self-optimizing has nothing to do with hard drives or their technology really. Also you do realize that UNIX is the single _oldest_ operating system around, right? Given that it probably has the most legacy stuff built into it. Far from "cutting edge", it's just, how shall we say it "up-to-date" because tons and tons of geeks love it and keep working on it.

What other self-maintenance are you referring to that OSX does for itself aside from makin copies of your files when they are fragmented? Hard drive scan at bootup? MacOS has done his since 7.5.x ...

Lastly I just want to say ... you don't need to defrag once a week or anything but for people that use their machines any amount -- specifically that are creating and deleting files constantly, will gain more benefit from defraging more often than once a year. The more you add and delete files the more often you will fragment files (and therefore benefit from defraging).


----------



## MacDoc (Nov 3, 2001)

Yep and the lower the RAM and less space on the drive you have remaining the issue happens more rapidly.

It's a good idea to do a backup clone and boot off it once in a while anyways - I do it maybe every couple of months and then run some utilities on the main drive to correct issues.

If I'm in hurry I use Drive Genius for defrag.
If I want a full optimize then I let it run when I'm away or sleeping as it does take time.

The come back to a noticeably snappier machine.


----------



## csonni (Feb 8, 2001)

What makes me a bit nervous about defragging is this: what's the possibility of corrupting a file or a number of files through defragging that you don't notice until several weeks down the road and you haven't run Time Machine that often? You're out of luck. That file, which was once good, is gone. Most of us have lots of files on our computers. Or maybe I'm wrong. Maybe defragging pauses no danger?


----------



## rgray (Feb 15, 2005)

csonni said:


> What makes me a bit nervous about defragging is this: what's the possibility of corrupting a file or a number of files through defragging that you don't notice until several weeks down the road and you haven't run Time Machine that often? You're out of luck. That file, which was once good, is gone. Most of us have lots of files on our computers. Or maybe I'm wrong. Maybe defragging pauses no danger?


ANY manipulation of a file poses a modicum of danger even if the chance is statistically small. Just run a backup right before you defrag... Seems a bit of a no brainer to me.


----------



## eMacMan (Nov 27, 2006)

Of course defraging poses some danger. Almost every file is written to another part of the HD deleted then written back. If the drive is more than two thirds full then there will certainly be multiple rewrites.

As previously mentioned best bet is to create a clone, boot from it and then take it for a very good test drive. Once you are sure the clone is good proceed with defragmentation secure that even if the power goes down in the middle of the process that you can recover your HD.


----------



## krs (Mar 18, 2005)

I think you're both missing the point csonni is trying to make.



> What makes me a bit nervous about defragging is this: what's the possibility of corrupting a file or a number of files through defragging that *you don't notice until several weeks down the road* and you haven't run Time Machine that often?


Something along the lines of what happened with my mail folder (not that it had anything to do with defrag but the issue is the same). The file was corrupt, actually missing thousands of messages without the slightest indication that anything was wrong.
I usually do a 3-cycle clone/back-up. I doubt if most people even do that. But if something gets corrupted today and it's information I don't look at very often, I may not notice this until months later and by that time the last "good" back-up of that is gone - overwritten by the numerous back-ups in the meantime.
I now save some files that I can't recover from at all, like my email on some permanent (well somewhat) media.

I clone on a pretty regular basis and then run off the clone. With CCC (haven't checked with SD) that will defrag the drive as well but it won't optimize it.
In practice, that's good enough for me.


----------



## Guest (Dec 13, 2009)

I have never, ever, lost a file to defragging, and I've been defragging since system 6.0.7


----------



## eMacMan (Nov 27, 2006)

krs said:


> I think you're both missing the point csonni is trying to make.
> 
> 
> 
> ...


I do disk images rather than clones and keep a partition free to test the image. I also clone only the OS. All of my personal data, photos and music is on a separate partition that gets backed up separately and to a different external drive. The disk image route is a bit of a pain but even with Tiger the system only is less than 10GBs which means my back-ups go back a couple of years. I create new Disk images before and after running updates or installing new software. As things are fairly stable this is only done a couple of times a year. Any critical eMail threads are saved outside of the application as is my address book (in the form of V cards).

Sounds clunky but overall probably takes far less time than most spend on system back-ups as only my personal files have to be backed up frequently.


----------



## csonni (Feb 8, 2001)

krs stated my concern correctly. I always do a backup before a defrag, but there is always a risk with files not examined very often.


----------



## krs (Mar 18, 2005)

eMacMan said:


> I do disk images rather than clones and keep a partition free to test the image.


What's the advantage of a disk image vs a clone?
Only time I ever do a disk image is for confidential financial files since I can password protect them.


----------



## eMacMan (Nov 27, 2006)

Each clone requires its own partition. You can save several disk images to the same partition. 

You do need two partitions in addition to the main partition on your external. The first is for a slimmed down clone of the OS. This is used as a boot partition for creating disk images; for booting from to erase and restore the internal drive from a disk image; and for emergency troubleshooting. The second is used to test the disk images as you cannot boot from a disk image.

It works for me because I keep my OS volume very slim, under 7 GBs for Panther and about 10 GBs for Tiger. Those whose main HD occupy well over 100 GB might just as well go with clones.

With the slim OS I can do an uncompressed back-up in less than an hour. More importantly I can do a full restore in less than 10 minutes with Panther and just over 15 minutes with Tiger. 

A lot depends on how you set up your main HD. Photos and iTunes account for much of my personal data. All of these things are shared with another user and I find it easiest to store them on a separate partition on my main HD. That allows me the luxury of easily backing up just the OS or just my personal data.

Edit: I should note that this method has evolved over several years. My main concern is not losing my photos. I suspect most users will prefer the elegant simplicity of TimeMachine coupled with an occasional HD clone.


----------



## cosmicrepairdude (Nov 7, 2007)

Hi,
I'm hoping some of you more experienced folks can answer this.
So, in the end, is there a practical difference in terms of speed, between 
-cloning your existing hard drive to an external, testing the clone, then erasing the original drive, then cloning back from the external, and
-using iDefrag?
Also, is TechTool Pro safe and effective for defragging? I already own a copy (5.0.4), but I've never used it for that because of negative reports on some sites in the past. If it's safe, how does it compare to iDefrag and cloning?
And would these answers be any different in 10.4 or 10.5?
Thanks


----------



## krs (Mar 18, 2005)

cosmicrepairdude said:


> Hi,
> So, in the end, is there a practical difference in terms of speed, between
> -cloning your existing hard drive to an external, testing the clone, then erasing the original drive, then cloning back from the external, and
> -using iDefrag?


Depends how you define "practical"
There are two aspects of cloning (with CCC, Carbon Copy Cloner at least, haven't used Super Duper) for a while and also two aspects of the broader term of defragmentation.

CCC will do either a block-level clone or a file-level clone.
With a block-level clone each block is individually copied and the clone you end up with is identical to the source with all the defragmentation intact on the clone.
My clones always ended up as file-level clones (not quite sure why - CCC makes that determination), but with a file-level clone pretty much all the defragmentation that was on the source is gone when you check the clone. I had one fragment left after file-level cloning and hundreds before that on the source drive.

But defragmentation is only part of the story - the other is "optimization" which MacDoc mentioned earlier as well. That essentially places files that need to be accessed more frequently on the faster parts of the drive. I don't think CCC does any optimization at all - idefrag on the other hand does both defragmentation and optimization.

Anyway - that's my understanding. But having said that, I don't use iDefrag either simply because I don't need a speed boost when it comes to accessing the hard drive.
The only speed boost I needed was to convert video files and I accomplished that by replacing my CPU with a dual CPU.

No clue about TechTool Pro - I personally will not use it - just too many horrer stories about it on the net.


----------



## SmudgeTheCat (Jan 5, 2008)

*wow....quite the response*

Thanks everyone for jumping all over this. My Mac Genius buddy says go with SuperDuper so I'll stick with that for now.


----------



## chas_m (Dec 2, 2007)

cosmicrepairdude said:


> So, in the end, is there a practical difference in terms of speed, between
> -cloning your existing hard drive to an external, testing the clone, then erasing the original drive, then cloning back from the external, and
> -using iDefrag?


This is the part that MacDoc keeps not seeing in my posts. He seems to think I am against defragging.

I am not. I am simply against paying a substantive amount of money for something I can do for free.

I have never told people to NEVER defrag their drives. I've ALWAYS said that it doesn't need to be done as often as users generally think it does. Then I've ALWAYS mentioned the "free" way to do it for people who want to do it.

I use this method myself, once or twice a year.

Is there a practical difference? MacDoc is more of an expert on this than I am, so I would defer to his answer on it. I make backups (using TM) and clones (using SD or CCC, I own both) all the time, so for me the "free" method can be done while I sleep so from my perspective it takes "no time at all."

Finally, for the record, I have never liked Kool-Aid.


----------



## cosmicrepairdude (Nov 7, 2007)

Oops, by "practical difference in terms of speed", I meant the speed of the the computer after the procedure has been completed, not the speed of the procedure. Sorry for not being clear.
Since I assume the bulk of any version of the procedure can be done overnight or when I'm out or doing something else, I wouldn't consider the length of time it takes to do so to be an issue.
Thanks for the responses.


----------



## mkolesa (Jul 22, 2008)

i'd also be curious to know, is there a fundamental difference between using something like idefrag or erasing your hd and then doing a restore from a cloned back-up? and if doing the erase and clone method is comparable what are the steps you'd take... i can imagine using the install discs to do a simple erase but would you then do a copy from the cloned back-up?


----------



## krs (Mar 18, 2005)

cosmicrepairdude said:


> Oops, by "practical difference in terms of speed", I meant the speed of the the computer after the procedure has been completed............


I understood that.
But "practical" increase will mean different things to different people.
For instance - I run my Mac 24/7 so an increase in boot time is really irrelevant for me.
Same for launching applications since the ones I use regularly are in my dock.

When I do the clone and then run from the clone, ie more or less defragmented but not optimized, the opening of folders is "snappier" but nothing that would entice me to spend any money and extra time doing.
Now, doubling my CPU capacity was really noticable when doing video conversions - an eight hour exercise would actually complete in just over four hours - that was practical to me.

BTW - last time I checked boot time it was 35 seconds - even if defragmentation/optimization cuts that in half, I would still not consider this a practical difference.


----------



## krs (Mar 18, 2005)

mkolesa said:


> i'd also be curious to know, is there a fundamental difference between using something like idefrag or erasing your hd and then doing a restore from a cloned back-up? and if doing the erase and clone method is comparable what are the steps you'd take... i can imagine using the install discs to do a simple erase but would you then do a copy from the cloned back-up?


I thought I explained the fundamental difference in one of the posts above.

Right now I just do an incremental clone, but when I do a complete clone either CCC will erase the drive you're cloning to or you can just do it using disk utility.
No need to get your install disks out.
And once I have completed the clone, I just boot off the clone and run that way until the next time when I clone back to the original drive.
I don't see any need to copy the clone back to the original drive - I think that's actually a bad idea. If there was a problem doing the clone and you don't notice it until after you copied the clone back to the original drive, then you just lost the good back up on the original drive.
I actually do three - two internals and one external.


----------



## cosmicrepairdude (Nov 7, 2007)

Here's how I would do the erase and clone:
Repair permissions on the boot drive and run the daily, weekly and monthly cron tasks (I use MacJanitor on my G4 and Maintidget on my Intel iMac for the cron jobs).
Update the backup drive with CCC.
Run DiskWarrior on the backup.
Reboot from the backup.
Erase the original drive using Disk Utility.
Clone from the backup to the original drive using CCC.
Run DiskWarrior on the original drive as I always find the directory needs tidying up and minor repairs after a clone operation.
Reboot from the original drive.

Comments?


----------



## krs (Mar 18, 2005)

General Comment for all the former Windows people -

Forget what you have been doing on Windows as far as back ups are concerned.
With OS X, just use Super Duper or Carbon Copy Cloner to make a clone on another drive - internal or external, a PPC Mac requires the external to be Firewire to be able to boot from it, an Intel Mac will also boot from a USB drive.
You can then boot and run from any of the cloned back ups - internal or external.

If you hold down the option key when booting, all boot drives connected to your Mac (internal or external) will show up and you can select the one you want to boot from and then click the right arrow to boot up on the drive that is selected.


----------



## krs (Mar 18, 2005)

cosmicrepairdude said:


> Here's how I would do the erase and clone:
> Repair permissions on the boot drive and run the daily, weekly and monthly cron tasks (I use MacJanitor on my G4 and Maintidget on my Intel iMac for the cron jobs).
> Update the backup drive with CCC.
> Run DiskWarrior on the backup.
> ...


OMG - I do none of that other than the actual clone - and I have been doing that since day one of OS X.
And as I explained above, erasing the original drive and cloning back leaves you with no clean back up should something have gone haywire with the clone.


----------



## cosmicrepairdude (Nov 7, 2007)

Hmm, I see KRS has posted while I was composing mine.
Should everyone have 2 backup drives? 
When it comes down to it, there's no way of knowing any of your clones were 100% successful, because if something got lost, it might be months before you went looking for that thing. Or is this the kind of problem that using DiskWarrior right after the clones, as I do, would prevent?


----------



## krs (Mar 18, 2005)

cosmicrepairdude said:


> When it comes down to it, there's no way of knowing any of your clones were 100% successful, because if something got lost, it might be months before you went looking for that thing.


True - but if you erase the original drive right away you can't even recover if you do notice something isn't right after you start using the copied clone.
In my opinion, there is just no need to do that - erase the original drive and clone back.
Just run off the clone until the next time when you clone back to the original drive..

As to disk warrior - all it does is rebuild the directory.
I only use it if the directory is corrupt and needs rebuilding which in the last ten years happened exactly zero times. I occasionally use disk utilities to verify the cloned drive I'm not running on - I assume if that passes verification the directory is fine (maybe someone can comment on that).
Basically - I take the approach if it ain't broke don't fix it - and - by running the Mac 24/7, I let the Mac worry about maintenance in the wee hours of the morning.

As to multiple clones - external USB hard drives are dirt cheap nowadays.
I would clone to one of those every few weeks or so, ort even have a permanent back up.
Or burn a back up to double layer DVDs.
In the end - if you ever need it - it's much cheaper and infinitely less frustrating than trying to recover from a HD crash.


----------

