Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to do a disk defragment on a mac book

How do i do a disk defragment on my mac book pro

MacBook Pro

Posted on Jan 23, 2012 1:45 PM

Reply
Question marked as Best reply

Posted on Jan 23, 2012 1:53 PM

It's just not necessary or done on a Mac. Some people do it (and you can find apps that help you out), but most old grizzled Mac users never do it. Don't bother, it won't do much.


Mac OS X's formatting system is quite advanced and doesn't use every nook and cranny of your hard drive. The only time when it "might" matter is when or if your hard drive is near full, and OS X is trying to find those nooks and crannies.


  • Hard disk capacity is generally much greater now than a few years ago. With more free space available, the file system doesn't need to fill up every "nook and cranny." Mac OS Extended formatting (HFS Plus) avoids reusing space from deleted files as much as possible, to avoid prematurely filling small areas of recently-freed space.
  • Mac OS X 10.2 and later includes delayed allocation for Mac OS X Extended-formatted volumes. This allows a number of small allocations to be combined into a single large allocation in one area of the disk.
  • Fragmentation was often caused by continually appending data to existing files, especially with resource forks. With faster hard drives and better caching, as well as the new application packaging format, many applications simply rewrite the entire file each time. Mac OS X 10.3 Panther can also automatically defragment such slow-growing files. This process is sometimes known as "Hot-File-Adaptive-Clustering."
  • Aggressive read-ahead and write-behind caching means that minor fragmentation has less effect on perceived system performance.


Message was edited by: OrangeMarlin

82 replies
Question marked as Best reply

Jan 23, 2012 1:53 PM in response to lweileman

It's just not necessary or done on a Mac. Some people do it (and you can find apps that help you out), but most old grizzled Mac users never do it. Don't bother, it won't do much.


Mac OS X's formatting system is quite advanced and doesn't use every nook and cranny of your hard drive. The only time when it "might" matter is when or if your hard drive is near full, and OS X is trying to find those nooks and crannies.


  • Hard disk capacity is generally much greater now than a few years ago. With more free space available, the file system doesn't need to fill up every "nook and cranny." Mac OS Extended formatting (HFS Plus) avoids reusing space from deleted files as much as possible, to avoid prematurely filling small areas of recently-freed space.
  • Mac OS X 10.2 and later includes delayed allocation for Mac OS X Extended-formatted volumes. This allows a number of small allocations to be combined into a single large allocation in one area of the disk.
  • Fragmentation was often caused by continually appending data to existing files, especially with resource forks. With faster hard drives and better caching, as well as the new application packaging format, many applications simply rewrite the entire file each time. Mac OS X 10.3 Panther can also automatically defragment such slow-growing files. This process is sometimes known as "Hot-File-Adaptive-Clustering."
  • Aggressive read-ahead and write-behind caching means that minor fragmentation has less effect on perceived system performance.


Message was edited by: OrangeMarlin

Jan 23, 2012 1:58 PM in response to Allan Eckert

Allan Eckert wrote:


I like that one about a politician. 😁 Cute.


I like to see him ddig himself out of that hole because he certainly come across as knowing nothing at all with that comment.


Allan

We'll see. He might never return.


It's hard not to be snarky around here, but seriously, it sounded like a troll comment. You know, PC's are real computers, but Macs are just toys. 😠

Jan 23, 2012 2:16 PM in response to eww

eww wrote:


Here is a detaled rundown on what defragmenting does and doesn't do and when it is and isn't needed on a Mac:


http://www.macattorney.com/ts.html#6

Thanks eww for posting that link.

Although the Mac file system does not Fragment files like the Windows file system does that does not mean some routine mantenance wouldn't help.

As explained in the link post by eww a defragging program can help move all files into a closer area of the drive giving a larger free space area for the operating system to work with.

Does it need to done on a scheduled basis or done as files are written like on a Windows PC? No. But it is not a bad Idea to do it every now and then. I have done it with no ill effects. The one thing you don't want to do is run it on a SSD just like you don't defragment SSDs on a Win PC.

Jan 23, 2012 2:54 PM in response to cmelbourne91

According to cmelbourne91, only pc's are computers. Everything else is "not a PC and therefore not a computer." Good logic. Therefore the million of linux servers that the internet runs on aren't computers, nor is the cray super-computer. Cmelbourne91 I know computer history - I starting programming the 8086 intel processor running MS/DOS in assembly language. Having run various flavors of windows and linux over the years it is my personal opinion that Apple has the finest operating system (since OSX came out). Also cmelbourne91 apple uses the same processor and system bus and graphics cards that your beloved PCs use.


As for the real question - I concur that Mac OSX maintains and optimizes the disk. I've run a macbook for years without fragmentation or slowing. There is a disk-utility if you want, and if you really need a clean disk for video processing Mac OSX has tools to copy to a clean external drive, boot off that drive, wipe your hard drive, and copy back. Voila.

Jan 23, 2012 3:09 PM in response to lweileman

The question hasn't yet been asked; why do you feel you need to defrag? Do you work with multi-GB audio or video files?

Are you experiencing slowing down of the system? If yes to that one, defragging is probably the least useful thing you'll need to do.


If you really, really, feel the need, James' final comment is the best and safest method. Clone the entire HD to an external HD, boot from the external and use DU to erase the Macintosh HD then clone the system back to the Macintosh HD.


Result - a freshly written copy of all your stuff in fully defragmented form.

Bonus - you now have a bootable back-up drive (which everyone ought to have anyway).

Jan 23, 2012 4:43 PM in response to OrangeMarlin

I didn't have external drives back then.


Nothing difficult about cloning a drive. Certainly safer than many defrag programmes, most of which only defrag files, not the free space, so their effectiveness is limited.


But unless you're handling large audio or movie files, or possibly raw images, you're more likely to run out of disk space before there's any significant fragmentation.

Jul 11, 2012 8:30 PM in response to cmelbourne91

cmelbourne91 wrote:


defrags wont work on a mac, simply because it is not a computer. This is a PC process, and wont help the mac in any way, due to the processing system and the lack of background processes that occur. a defrag wont help you, the only way to try and imitate it, is to trawl through the mac syastem looking over your files.


The Lack of Background Proccess?

It's a completely deferent file system! Treads or Proccess have nothing to do with it. Exept to run the defrag program. HardDrives use Platters, Clusters & Sectors.

When a file is copied on a Windows machine, the OS copies the file on the 1st bits of Free Space the the Platter. Once that Patter is full it will continue the copy procces on the next Platter, Cluster or Sector of the HD, until the file is done coping. Filling up any & all Free space along the way. So a 1gig file could & does end up Scattered across the HD.

On a Mac machine, the OS copies the same 1gig file on the Continuous Free Space Part of the HD. No it does not start splitting the file, & scatter it across the HD. So when you Delete or Uninstall a File or Program you Delete the whole file.

I'm NOt Saying ya don't know what you're say, but I am saying ya need to be specific in your wording. & provide Sources.

Here's more for Apple..

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


'"You probably won't need to optimize at all if you use Mac OS X. Here's why:


  • Hard disk capacity is generally much greater now than a few years ago. With more free space available, the file system doesn't need to fill up every "nook and cranny." Mac OS Extended formatting (HFS Plus) avoids reusing space from deleted files as much as possible, to avoid prematurely filling small areas of recently-freed space.
  • Mac OS X 10.2 and later includes delayed allocation for Mac OS X Extended-formatted volumes. This allows a number of small allocations to be combined into a single large allocation in one area of the disk.
  • Fragmentation was often caused by continually appending data to existing files, especially with resource forks. With faster hard drives and better caching, as well as the new application packaging format, many applications simply rewrite the entire file each time. Mac OS X 10.3 Panther can also automatically defragment such slow-growing files. This process is sometimes known as "Hot-File-Adaptive-Clustering."
  • Aggressive read-ahead and write-behind caching means that minor fragmentation has less effect on perceived system performance.

For these reasons, there is little benefit to defragmenting.""

how to do a disk defragment on a mac book

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.