Defragment mac hard drive?

JohnK

Veteran Member
Messages
7,214
Solutions
1
Reaction score
985
Location
New York City, US
Hi, as with a PC, is it advisable to "defragment" the hard drive in a mac periodically, and if so, how is it done?
Thanks,
--
JohnK
Take a picture, it'll last longer.
http://wwwdotjohnkennyphotographydotcom
 
Not the whole truth...big files, over 20 Mb, are not touched by Max OS X. 20 Mb isn't very big if you ask me. I have Virtual Machines on my mac where the file size is several GB. Heavy fragmentation on those really shows.

Here is some reading, http://reviews.cnet.com/8301-13727_7-10328197-263.html

I have iDefrag and a fully optimized drive is significantly faster than a heavily fragmented one.

Another factor that will slow down a mac or pc is a nearly full drive...some reading on that subject http://macperformanceguide.com/Storage-WhyYouNeedMoreThanYouNeed.html
As Leo said.
It is unnecessary because the Mac OS does that on the fly.

SmertZ
--
Mikael
 
You'll see a whole gamut of answers here, some saying no, others stating you'll need too.

The bottom line is, if you're dealing with large files that are being rewritten too, then fragmentation will occur. This isn't a huge deal for the most part, but performance will be impacted and if you're working with video or audio its a must.

Personally, I don't really see too much need, if you have a large file like a VMware VM that is fragmented. Just move it to an external drive, delete it from the main drive and recopy it back. That will in a sense defrag that one file.

I have used iDefrag in the past, and its a good solid utility but after it did its magic, I really didn't notice any real performance increase.
 
Not the whole truth...big files, over 20 Mb, are not touched by Max OS X. 20 Mb isn't very big if you ask me. I have Virtual Machines on my mac where the file size is several GB. Heavy fragmentation on those really shows.
Except that a virtual machine image is actually a bundle containing many files which could be anywhere on the disk, making defragmenting moot.

Defragmenting the contents of the image by running a Windows defragmenter within the VM will likely help a lot more than worrying about the OS X side.
I have iDefrag and a fully optimized drive is significantly faster than a heavily fragmented one.
It is negligibly faster except in very specific situations such as high end video.
Another factor that will slow down a mac or pc is a nearly full drive...some reading on that subject
It makes very little difference in real world use.
 
Not the whole truth...big files, over 20 Mb, are not touched by Max OS X. 20 Mb isn't very big if you ask me. I have Virtual Machines on my mac where the file size is several GB. Heavy fragmentation on those really shows.
Except that a virtual machine image is actually a bundle containing many files which could be anywhere on the disk, making defragmenting moot.
I know and when you create a VM on Windows or use VMware Converter or the available command line tools there are several options on how to layout your vmdk files (if it's Vmware). Parallels and Virtualbox have other options.

When I look at my disk the VMware VM have 2GB file segments. Parallels and Virtualbox have single image files, 14GB and 4GB.
Defragmenting the contents of the image by running a Windows defragmenter within the VM will likely help a lot more than worrying about the OS X side.
I disagree. I have 20 servers in my lab at works. All running different virtualization products and I have been using VMware since version 2 on the desktop. Defragmenting the guest os is rarely worth the work.
I have iDefrag and a fully optimized drive is significantly faster than a heavily fragmented one.
It is negligibly faster except in very specific situations such as high end video.
Another factor that will slow down a mac or pc is a nearly full drive...some reading on that subject
It makes very little difference in real world use.
We are not talking about big improvements here in any case. All small tweaks. The biggest improvement is to install an SSD drive.

--
Mikael
 
We are not talking about big improvements here in any case. All small tweaks.
True, which is why taking the time (and risk) to defragment or keep the drive no more than partially full is not worth it, except if you are doing something like high end video

http://support.apple.com/kb/HT1375

"Mac OS X systems use hundreds of thousands of small files, many of which are rarely accessed. Optimizing them can be a major effort for very little practical gain. There is also a chance that one of the files placed in the "hot band" for rapid reads during system startup might be moved during defragmentation, which would decrease performance."
 
There may be some benefit to defragging now that raw files and other multimedia files (video) are exceeding 20MB; the files from my Canon 7D are like 25MB or so.

On the other hand, let's think about what you're trying to do here. You're trying to make your disk marginally faster by defragging. But to defrag you've got to take the machine out of commission for many hours while the defragger does its thing. Is that a net gain? Plus, when you run the defragger, you're running the disk very hard, continuous reading and writing for hours and hours. In fact there is probably nothing else you will do that will stress your hard drive more than running a long defrag session. It gets really hot. Are you really trying to gain milliseconds by shortening the life of your drive?

I don't bother, and I did buy iDefrag. If I want to defrag, I'll do it the fast way: Clone all the files to another drive, then clone them all back on so they write contiguously. Only takes a couple hours, less than running a defragger.

This article is another opinion...
"Optimizing Disks is a Waste of Time"
http://db.tidbits.com/article/7254
 
Not if it's a file based cloning / copy process which is the usual case.

If it was a block based process you're correct. In some circumstances CCC will do a block level clone.
If I want to defrag, I'll do it the fast way: Clone all the files to another drive, then clone them all back on so they write contiguously. Only takes a couple hours, less than running a defragger.
Wouldn't the cloning process simply duplicate your original drive, fragmentation and all?

--
My Art, Your Pleasure

--
Mikael
 
We are not talking about big improvements here in any case. All small tweaks.
True, which is why taking the time (and risk) to defragment or keep the drive no more than partially full is not worth it, except if you are doing something like high end video
each to his own...you don't have to;-)
http://support.apple.com/kb/HT1375

"Mac OS X systems use hundreds of thousands of small files, many of which are rarely accessed. Optimizing them can be a major effort for very little practical gain. There is also a chance that one of the files placed in the "hot band" for rapid reads during system startup might be moved during defragmentation, which would decrease performance."
--
Mikael
 
webfrasse correctly explained my point of view. Yes, if you go to the trouble of doing a block-level clone you will copy fragmentation, but I assumed that nearly all users won't have software that does that, and of the few who do, most of those won't turn on the block level option. It was a niche digression I chose not to get into.
If it was a block based process you're correct. In some circumstances CCC will do a block level clone.
If I want to defrag, I'll do it the fast way: Clone all the files to another drive, then clone them all back on so they write contiguously. Only takes a couple hours, less than running a defragger.
Wouldn't the cloning process simply duplicate your original drive, fragmentation and all?
 
Website says "To defragment your boot volume, you need to boot from a different volume (except for on-line defragmentation feature)."

What does this mean?
This means you cannot boot up on your main hard drive and be able to defrag it. iDefrag has a utility to make a bootable CD which you'll need to use if you wish to defrag it. I have cloned version of my internal hard drive and so I can boot up on that as well. The OS locks the boot volume preventing write access to operating system folders and various other files which is why you need to boot up on some other drive (be it an external hard drive or a CD).

As for your other question regarding cloned images defragging for you. Yeah its possible but products like Carbon Copy Cloner use a block by block cloning, not a file by file cloning process so if the blocks contain file fragments you'll get those fragments back again.
 
Website says "To defragment your boot volume, you need to boot from a different volume (except for on-line defragmentation feature)."

What does this mean?
This means you cannot boot up on your main hard drive and be able to defrag it. iDefrag has a utility to make a bootable CD which you'll need to use if you wish to defrag it. I have cloned version of my internal hard drive and so I can boot up on that as well. The OS locks the boot volume preventing write access to operating system folders and various other files which is why you need to boot up on some other drive (be it an external hard drive or a CD).

As for your other question regarding cloned images defragging for you. Yeah its possible but products like Carbon Copy Cloner use a block by block cloning, not a file by file cloning process so if the blocks contain file fragments you'll get those fragments back again.
CCC only does this under certain circumstances. One of those is that the backup disk needs to be bigger than the disk you're backing up. So in that case you're backup will have the fragmentation but when you reverse the cloning back to the original drive that isn't true anymore and you will have a regular file copy and thus no fragmentation. Notice that you need to wipe the drive before copying back the files otherwise nothing will really happen. Only changes will come across.

CCC uses rsync under the covers to do it's copy. Take a look in the activity monitor when you run it...

--
Mikael
 
I think I'll leave it alone. Starting to like this mac after 9 mos. :)
--
JohnK
Take a picture, it'll last longer.
 

Keyboard shortcuts

Back
Top