You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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 Top-ranking 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

Feb 18, 2013 4:59 PM in response to Csound1

ok, now your answer sounds to me like: It is gigabyte NOT percent. OS X can work fine, including auto disk fragment with 20 Gigabyte on any drive, no matter the size.

Calculating in percent is crazy, especially on large 2, 3 & 4 TB drive's.

That's what ik think too.


@John Galt: this guy claimed it was one of the questions he had to answer in the multiple choice way. It was alway's percent. Further on he goes: 'just only for deep sleep to work, one needs 3 times the ram memory on disk'. Discussion was related to a iMac with 8 GB. So x 3 is 24 GB. further on he said:

On a 750 GB with only 15 GB free, automatic defragment wouldn't even work, would be switched off by OS X, because defragmenting would last forever....

Feb 18, 2013 5:10 PM in response to ds store

DS store: i read your article before posting here.

But i didn't see my question answered there. Never the less, very interesting, i bookmarked it and put it on a dutch forum as a guide.


So what's your opinion?

20 GB free space on any disk, no matter the disksize is fine for OS X to do his job, including auto-defragment,


or would you say 10 - 15 percent free space needed?

which makes 300 to 450 GB on a 3 TB disk...

:-)

Feb 18, 2013 5:17 PM in response to bonimac

You may assume that it does. It is more correct to say OS X optimizes the disk space it uses.


It is not advantageous to run third party defragmentation software, and may actually be detrimental to performance. Only OS X knows where its many files ought to reside. Disk "defragmenters" have no way of determining that, and may relocate them to a less than optimum location.

Feb 18, 2013 5:43 PM in response to John Galt

'i may assume that is does'... That OS X is satisfied with 20 GB on any size of disk you mean.

And indeed, OS X optimizes is an more correct way to say then OS X defragments.


Me and this guy agree on not running third party software.

The only thing we do NOT agree, is the gigabite versus procent issue.

Without hesitating he writes: on a 2 TB drive you need to have 200 GB free...


Where i stick to 20 GB.

Now confirmed here, but i'm not going to show him this link.

As a Apple Certified Technician with more than 12.000 post on that Belgian forum he is convinced OS X needs 10 to 15 percent free space, whatever the size of the drive.


actually, i would like to find any comment from Apple itself.

But the only article i can find is this no longer updated and archived one: http://support.apple.com/kb/ht1375

Feb 18, 2013 7:09 PM in response to John Galt

I am CompTIA Cert. I hold several from them. 1st lets start with, A hard drive is a hard drive and needs to be defragmented from time to time. Even Apple said so... (Toward the end of the article ) http://support.apple.com/kb/HT1375#


You will note Apple explains a little of how Disks end up with fragments. They all so state 'you might benefit' Defragmentation, use third party utilities. Here is the link to the Review of the utility I use & recommend.... http://reviews.cnet.com/8301-13727_7-10422120-263.html


This guys How-To is good if you need to just start over ( https://discussions.apple.com/docs/DOC-4032 ). But the massive dump of data to be restored will cause quite a bit a Fragmentation. Best just to start the way the article states with the bootable image of the system(Verify the image before proceed), Delete all the data you don't want. I would go for near to all, Run the defrag program, Boot into your bootable image, And then copy over the files you need and or want to have on your main hard drive(You will have to jump through quite a bit of folders to find your user profile), to their appropriate locations, one by one(Not folder by folder, but one individual file at a time.), & let each one finish before starting the next. This way each file will write on to one cluster of the disc contiguously.


Also, for future reference, try not to write multiple files simultaneously to the disk. Set Safari and iTunes to only allow one download at a time not simultaneously. This will help to combat fragmentation but will not prevent.


Mac OS X handles defragmentation in 20 MB chunks. It can handle no greater than 4 GB chunks of data. This is why a Windows machine cannot write a file greater than 4GB onto a GUID partitioned hard drive on an Apple router. You would need a Mac to do that.




Some time just running MemoryFreer (found in Mac AppStore) will help, as lots of unused data likes to stay in RAM. & use IStatPro to help you monitor your system RAM, Fan, HD & more.



There are tons of these articles within Apple's archived sections That help explain this.


For best Practices, I recommend 20% free space of what the Hard Drive is. 200GB = 40GB free at least at all times. (160GB = 32GB) that's 20%.


I hope this helps as I have been getting a lot of emails on the subjects from this post. I had posted earlier in this thread look back to the first or second page for my earlier post.


I reread some of the posts. A few post after my earlier post, someone also put down some good info check it out.



.

Feb 18, 2013 7:16 PM in response to John Galt

Forgot to say the Reason for the 20% recommendation is not just for me. Countless developers that write defragmentation programs, Recommend the same. This is because the program needs to actually move the data from one Sector and/or cluster of the hard drive to another Sector and/or cluster of the hard drive.


If the program notes that one sector and/or cluster is contiguous, And needs to be moved because the sector is bad, Then all of that data has to go somewhere, And if there is not enough free space to move this data around, then it will slow down, or decrease the performance of the defragmentation program.


Again I hope this helps.

Feb 18, 2013 7:35 PM in response to Chewyid

Chewyid wrote:


Even Apple said ...



... there is little benefit to defragmenting.


When that article was written Macs shipped with 80 GB HDDs.


For best Practices, I recommend 20% free space of what the Hard Drive is. 200GB = 40GB free at least at all times. (160GB = 32GB) that's 20%.


Recommend what you want. When Apple recommends something let me know.

Feb 18, 2013 8:05 PM in response to Chewyid

Chewyid, thanks for your contribution,


but some remarks:

- 20% of a new iMac 27inch with a b.t.o. 3 TB drive means 600 GB which is supposed not to be used because Countless developers that write defragmentation programs recommend the same, as you write.

So we are talking about software developers, where Apple itself nowhere recommends this 20 or 15% to be kept free.


- I'm not saying that Garry from Macmost now, knows it all, i'm just sharing his movie (march 2010) about his thoughts according the need of defrag a Mac as just another opinion.


- Maybe there are two kind of basic rule.

1) For those people who want to use defragmentation programs, keep 20% free, because their developers say so.

2) For those Mac users who don't want to use defragmentation sofware, it's easy: never mind. Keep at least 20 GB free for OS X and everything is fine.

Feb 18, 2013 8:05 PM in response to John Galt

The article was "" Last Modified: Feb 10, 2010

Article: HT1375

Views: 1079589

Rating:

4.0/5 Stars

(4209 Responses) ""



"" Products Affected

Mac OS X 10.0, Mac OS X 10.1, Mac OS X 10.2, Mac OS X 10.3, Mac OS X 10.4, Mac OS X 10.5 ""


I'm running 10.8.2 there's no difference in the way the Kernel handles files when Mac OS Extended is formatted (HFS Plus).



Furthermore there is no difference between an 80 gig hard drive and 2 TB hard drive. The differences come in the way you formatted the hard drive, or, in the mechanics of the hard drive. Such as read right times, Due to the facts of the RPMs, And quality of the heads. This is only in mechanical drives, not solid-state drives(There is no need to defrag a solid-state drive).


You will also begin to see you very little in the way of Apple supported articles, Unless you dig into their archive sections. This is partly because Apple is starting to use fusion drives, and partly because Apple is moving away from power users.


If you really need to I would say start off at the basics on how hard drives works (chapter 11) here's a link.. http://www.amazon.com/CompTIA-Certification-Seventh-Edition-220-701/dp/007170133 8


Sorry we could not be of help. But this is from experience and practical use. The folks at CNET.COM Are leading tech reviewers, You should trust them if you don't know about IT. If you are truly needing to do this or are just curious, I recommend trying it yourself (Make a system image first though, It's always good to do a backup Before such experiments). Record the results for yourself. I have tons of logs that support this data.

Feb 18, 2013 8:21 PM in response to bonimac

I like the way you broke it down within a Antwerp be choice. But remember the hard drive is still a hard drive and still needs to be defragmented. That being said, You should keep at lest 20% free, (less is ok Depending on file size).


So, option B would not work.


Even Mac OSx, Needs to move contiguous clusters of data around. If there is not enough space on the hard drive to do this efficiently, you will get Less performance from your operating system and hard drive.


If you were seriously needing massive amounts of storage, To be readily available, I recommend moving nonconsensual data to a removable hard drive. Or installing another hard drive in the system, and moving the data took that drive. I state this only because you keep bringing up terabytes.


I myself have an 8 TB system, In non-RAID formation. I keep 1 terabyte for documents, 1 TB for pictures, 2 TB for music, 2 TB for movies, 2 TB for backups. Although this is on the network, via an apple airport extreme. This way I only keep the essentials on my laptops, and or desktop. If I want to movie or, music, then I just copy what I want to the laptop for temporary. For the desktops, I just map the hard drives to the computers.


In this scenario, the operating systems themselves don't have to worry about a lot of data, since all of the media is on the network.


Again hope all of this helps.

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 Account.