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
82 replies

Feb 18, 2013 4:39 PM in response to bonimac

bonimac wrote:


sorry Csound1, but i could'n do anything with your answer. Can you translate it please.

Sounds to me like: it's 15 euro's until you reach 10 dollars, then it's enough.


15 percent free, once that 15 percent equals 10G (or more) you have enough free space for the OS to do it's job, more may be better, less will be worse.

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

Feb 19, 2013 10:22 AM in response to Chewyid

yo chewyid, i knew what you meant :-)


Well, A or B (or 1 & 2 as i changed it), i've been thinking about it... maybe it's not that important to know if it's 10, 15 or 20 percent or gigabyte.


If anyone is filling up his drive till 80% or more, it's about time he should start thinking about deleting or moving a lot of movies to a NAS of DAS for example.


Probably it's true OS X is fine with 20, 30 GB for working and optimizing on whatever size of drive, but why filling up a 1, 2 or 3 TB drive that far?


On the other hand, keeping 600 GB free on a 3TB drive, being guided by the 20% rule still sounds absurd to me.

Unless an Article from Apple shows up this is indeed a good free-space safety guide.


I would now recommend a 27 inch iMac with b.t.o. 3TB owner who reached the '100 GB' left border to start thinking urgently about cleaning / deleting / moving / expanding.


thx all.

Mar 10, 2013 4:00 PM in response to davscanlon

SDD does fragment, even on a Mac.


The problem about fragmentation:

Let's say that you're opening a file of 1GB, the speed of read will depend on the speed of the disk.

But if the same 1GB file is splited in 100 parts and spread across the disk, you will have 100 chunks of 10mb of data, and even if you can read the 1gb file very fast, the HDD will read 10mb and then move the head to the next chunk, read 10mb... and the head will be moving back and forth, and the head have a mechanic latency to move from one place to another before it can read the next chunk of data, slowing down the whole process.


About SDD:

You probably know that SDD doesn't have any moving parts, that's what SSD means. And it means that accessing any location of the flash memory will have the same latency. Doesn't matter if the you're reading the address 0x00000001 and then the 0x00000002 and then 0x00000003 or if you're reading 0x0003405103 and then 0x00000004 and then the 0x503040506, the latency is fixed. So the speed is constant like RAM memory (random access memory).


This doesn't meand that fragmentation doesn't exist on SDD, that's mean that you don't need to bother about fragmentation on a SSD.


Hope I made it clear.

Mar 10, 2013 5:02 PM in response to Vitimtk

SSDs by the nature of the way they store data are fragmented. It is not that they Get Fragmented, They are supposed to be fragmented. Good SSDs with good write systems place new data on different parts of the drive so one set of memory cells don't get worn out. It is called Wear Leveling. There is no need to do anything to a SSD

Vitimtk wrote:


SDD does fragment, even on a Mac.




This doesn't meand that fragmentation doesn't exist on SDD, that's mean that you don't need to bother about fragmentation on a SSD.


Hope I made it clear.

Mar 10, 2013 7:25 PM in response to Shootist007

Yeah, that's true, even if the data seems to be stored sequentially by the OS or any other program, the SSD controller addresses NAND gates in a specific pattern across the chip. Which is very similar to the way RAMs work.


I just wanted to put in simple words and emphasize that file fragmentation on SSD does not slow down the speed, due to the fixed latency in random accesses.


And because I often seen people saying that SSDs does not fragment, which is incorrect, it happens, you just don't need to worry about it.

Mar 10, 2013 7:44 PM in response to lweileman

I have a reason to defragment a HDD on a mac, I'm doing it right now. But on a external HDD, which I was running windows on a laptop for 3 years, the laptop died months ago, and I'm using it on a usb case since then on my mac.

I was running Windows for more than a year everyday, with less than a gig free and at some points I was with less than 10mb free. File fragmentation got **** high, that the hard drive turned very very slow, and very noisy (annoying clicking noise).


I'm running defragmentation for the first time on that HDD on my mac, for more that 6 hours, the file fragmentation was more than 49%. I'm thinking in formating it later to Mac Journaled format, if I get somewhere to backup this data.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

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.