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

Defragmenter Utility?

Is there an application (either provided by Apple or a third-party developer) that I can use to safely degragment my Macbook Pro's hard drive?


I have noticed that my OS seems to be slowing down considerably more on the Mac side of my Macbook rather than the Windows side.

Macbook Pro

Posted on Nov 11, 2012 7:02 PM

Reply
Question marked as Best reply

Posted on Nov 11, 2012 7:05 PM

Firstly, defragmentation is not necessary. Secondly, there is no program that can safely defragment a drive. I would not recommend defragmentation. But if you can't live another day until you do, then here's the safest and fastest way:


Cheap and Easy Defragmentation


You will have to backup your OS X partition to an external drive, boot from the external drive, use Disk Utility to repartition and reformat your hard drive back to a single volume, then restore your backup to the internal hard drive. You will use Carbon Copy Cloner to create the backup and to restore it.


1. Get an empty external hard drive and clone your internal drive to the

external one.

2. Boot from the external hard drive.

3. Erase the internal hard drive.

4. Restore the external clone to the internal hard drive.


Clone the internal drive to the external drive


1. Open Carbon Copy Cloner.

2. Select the Source volume from the left side dropdown menu.

3. Select the Destination volume from the left side dropdown menu.

4. Be sure the Block Copy button is not depressed or is ghosted.

5. Click on the Clone button.


Destination means the external backup drive. Source means the internal startup drive.


Restart the computer and after the chime press and hold down the OPTION key until the boot manager appears. Select the icon for the external drive and click on the upward pointing arrow button.


After startup do the following:


Erase internal hard drive


1. Open Disk Utility in your Utilities folder.

2. After DU loads select your internal hard drive (this is the entry with the

mfgr.'s ID and size) from the left side list. Note the SMART status of the

drive in DU's status area. If it does not say "Verified" then the drive is

failing or has failed and will need replacing. SMART info will not be

reported on external drives. Otherwise, click on the Partition tab in the

DU main window.

3. Under the Volume Scheme heading set the number of partitions from the

drop down menu to one. Set the format type to Mac OS Extended

(Journaled.) Click on the Options button, set the partition scheme to

GUID then click on the OK button. Click on the Partition button and wait

until the process has completed.


Restore the clone to the internal hard drive


1. Open Carbon Copy Cloner.

2. Select the Source volume from the left side dropdown menu.

3. Select the Destination volume from the left side dropdown menu.

4. Be sure the Block Copy button is not selected or is ghosted.

5. Click on the Clone button.


Destination means the internal hard drive. Source means the external startup drive.


Note that the Source and Destination drives are swapped for this last procedure.


But far better to do some system maintenance which is far less hazardous:


Things You Can Do To Keep Your Computer From Slowing Down


If your computer seems to be running slower here are some things you can do:


Boot into Safe Modethen repair your hard drive and permissions:


Repair the Hard Drive and Permissions Pre-Lion


Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.


If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.


Repair the Hard Drive - Lion


Boot from your Lion Recovery HD. When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.


Boot to the Recovery HD:


Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.


Restart your computer normally and see if this has helped any. Next do some maintenance:


Suggestions for OS X Maintenance


For situations Disk Utility cannot handle the best third-party utility is Disk Warrior; DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.


OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep. Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger. These utilities have limited or no functionality with Snow Leopard or Lion and should not be installed.


OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems. For more about malware see Macintosh Virus Guide.


I would also recommend downloading a utility such as TinkerTool System, OnyX 2.4.3, or Cocktail 5.1.1 that you can use for periodic maintenance such as removing old log files and archives, clearing caches, etc.


For emergency repairs install the freeware utility Applejack. If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line. Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. There is no confirmation that this version also works with Lion.


When you install any new system software or updates be sure to repair the hard drive and permissions beforehand.


Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):


1. Carbon Copy Cloner

2. Data Backup

3. Deja Vu

4. SuperDuper!

5. SyncTwoFolders

6. Synk Pro

7. Synk Standard

8. Tri-Backup


Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.


Additional suggestions will be found in Mac maintenance Quick Assist.


Referenced software can be found at CNet Downloads or MacUpdate.


Additional Hints


Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.


Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.


Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.


Check for applications that may be hogging the CPU:


Open Activity Monitor in the Utilities folder. Select All Processes from the Processes dropdown menu. Click twice on the CPU% column header to display in descending order. If you find a process using a large amount of CPU time, then select the process and click on the Quit icon in the toolbar. Click on the Force Quit button to kill the process. See if that helps. Be sure to note the name of the runaway process so you can track down the cause of the problem.


Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

15 replies
Question marked as Best reply

Nov 11, 2012 7:05 PM in response to nad2.0

Firstly, defragmentation is not necessary. Secondly, there is no program that can safely defragment a drive. I would not recommend defragmentation. But if you can't live another day until you do, then here's the safest and fastest way:


Cheap and Easy Defragmentation


You will have to backup your OS X partition to an external drive, boot from the external drive, use Disk Utility to repartition and reformat your hard drive back to a single volume, then restore your backup to the internal hard drive. You will use Carbon Copy Cloner to create the backup and to restore it.


1. Get an empty external hard drive and clone your internal drive to the

external one.

2. Boot from the external hard drive.

3. Erase the internal hard drive.

4. Restore the external clone to the internal hard drive.


Clone the internal drive to the external drive


1. Open Carbon Copy Cloner.

2. Select the Source volume from the left side dropdown menu.

3. Select the Destination volume from the left side dropdown menu.

4. Be sure the Block Copy button is not depressed or is ghosted.

5. Click on the Clone button.


Destination means the external backup drive. Source means the internal startup drive.


Restart the computer and after the chime press and hold down the OPTION key until the boot manager appears. Select the icon for the external drive and click on the upward pointing arrow button.


After startup do the following:


Erase internal hard drive


1. Open Disk Utility in your Utilities folder.

2. After DU loads select your internal hard drive (this is the entry with the

mfgr.'s ID and size) from the left side list. Note the SMART status of the

drive in DU's status area. If it does not say "Verified" then the drive is

failing or has failed and will need replacing. SMART info will not be

reported on external drives. Otherwise, click on the Partition tab in the

DU main window.

3. Under the Volume Scheme heading set the number of partitions from the

drop down menu to one. Set the format type to Mac OS Extended

(Journaled.) Click on the Options button, set the partition scheme to

GUID then click on the OK button. Click on the Partition button and wait

until the process has completed.


Restore the clone to the internal hard drive


1. Open Carbon Copy Cloner.

2. Select the Source volume from the left side dropdown menu.

3. Select the Destination volume from the left side dropdown menu.

4. Be sure the Block Copy button is not selected or is ghosted.

5. Click on the Clone button.


Destination means the internal hard drive. Source means the external startup drive.


Note that the Source and Destination drives are swapped for this last procedure.


But far better to do some system maintenance which is far less hazardous:


Things You Can Do To Keep Your Computer From Slowing Down


If your computer seems to be running slower here are some things you can do:


Boot into Safe Modethen repair your hard drive and permissions:


Repair the Hard Drive and Permissions Pre-Lion


Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.


If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.


Repair the Hard Drive - Lion


Boot from your Lion Recovery HD. When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.


Boot to the Recovery HD:


Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.


Restart your computer normally and see if this has helped any. Next do some maintenance:


Suggestions for OS X Maintenance


For situations Disk Utility cannot handle the best third-party utility is Disk Warrior; DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.


OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep. Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger. These utilities have limited or no functionality with Snow Leopard or Lion and should not be installed.


OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems. For more about malware see Macintosh Virus Guide.


I would also recommend downloading a utility such as TinkerTool System, OnyX 2.4.3, or Cocktail 5.1.1 that you can use for periodic maintenance such as removing old log files and archives, clearing caches, etc.


For emergency repairs install the freeware utility Applejack. If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line. Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. There is no confirmation that this version also works with Lion.


When you install any new system software or updates be sure to repair the hard drive and permissions beforehand.


Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):


1. Carbon Copy Cloner

2. Data Backup

3. Deja Vu

4. SuperDuper!

5. SyncTwoFolders

6. Synk Pro

7. Synk Standard

8. Tri-Backup


Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.


Additional suggestions will be found in Mac maintenance Quick Assist.


Referenced software can be found at CNet Downloads or MacUpdate.


Additional Hints


Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.


Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.


Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.


Check for applications that may be hogging the CPU:


Open Activity Monitor in the Utilities folder. Select All Processes from the Processes dropdown menu. Click twice on the CPU% column header to display in descending order. If you find a process using a large amount of CPU time, then select the process and click on the Quit icon in the toolbar. Click on the Force Quit button to kill the process. See if that helps. Be sure to note the name of the runaway process so you can track down the cause of the problem.


Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

Nov 11, 2012 7:47 PM in response to Kappy

On of the thing that Carbo Copy doesn't do during cloning, it doesn't make Recovery HD partition. To make a Recovery partition...


After you clone the external HD back over to the internal HD...


Carbon Copy Cloner menu... Window... Disk Center.


User uploaded file


Recovery tab... pick the newly cloned HD from the left panel... And follow the directions after that. This should take about a minute to do. You don't need to necessarily make a Recovery partition on the external HD. If you wish to you can.

User uploaded file

Nov 11, 2012 10:03 PM in response to David M Brewer

I have both Lion and ML on separate partitions on external hard drives (as well as the internal) and yes, I have separate recovery partitions for each OS on each partition on each hard drive. So, if you have 10 OS's on 10 partitions, I guess you could have 10 recovery HDs.


If there is a recovery partition present, CCC will automatically make sure it is up to date; if not, it offers to update it or create one if there isn't one.

Nov 13, 2012 8:13 AM in response to baltwo

I did mean to say external drives/partitions to create the recovery HD on...... you catch everything, don't ya..... 😀 However, I also have the recovery HD on my internal boot drive partition, created when I reinstalled the OS. I'm guessing that it used that to create it on the external partitions (haven't had a chance to read the manual yet).



User uploaded file

Nov 13, 2012 9:27 AM in response to nad2.0

nad2.0 wrote:


Is there an application (either provided by Apple or a third-party developer) that I can use to safely degragment my Macbook Pro's hard drive?


I have noticed that my OS seems to be slowing down considerably more on the Mac side of my Macbook rather than the Windows side.

Assume you have done the customary things:

  1. Verify/Repair permissions, verify disk within Disk Utility
  2. Boot in Safe Mode to toss font caches, etc.
  3. Observed that your boot drive is not nearly full, or if SSD, not over half-full (slower algorithms).
  4. Have enough memory (cough).


Your hard drive is not fragmented, but the system directory structure that points to the files on the drive, may be fragmented. I know that the mention of DiskWarrior evokes great gnashing of teeth and clamoring within the community, especially by those that swear by Carbon Copy Cloner. And yes, it is always a good idea to have a backup image of your boot disk. CCC is one avenue for that.


DiskWarrior is very good at rebuilding/recovering the system directory structure. It needs to run from a bootable, external OS X drive. It is reasonably quick, and since 2005, it has never damaged any of my boot disks. Prior to installing an SSD, I ran DiskWarrior about every other month as a maintenance task, or when it showed > 25% directory fragmentation. The interactive performance on reboot was noticeable. DiskWarrior is available from Alsoft in Spring, Tx.


When the Windows side does slow down, you might consider tweaking it with a trial copy of Condusive Software's Diskeeper 12. Does a more thorough defrag job than what comes with Windows.

Nov 13, 2012 9:44 AM in response to VikingOSX

I know that the mention of DiskWarrior evokes great gnashing of teeth and clamoring within the community, especially by those that swear by Carbon Copy Cloner.

As you suggest though, for the large part the two tools do very different things. Diskwarrior rebuilds directories, and in doing so will defragment the directory files, if possible. It won't deal with data file fragmentation, if there is any, or free space fragmentation. Nor is DW a backup tool. It basically does its one thing and is arguably the best at doing it. Carbon Copy Cloner is a copying/cloning tool and the only thing it does differently from Finder in this regard is it will copy everything from one drive to another, including hidden files. Simply copying from one drive to another will defragment if there is existing continguous space on the other drive. CCC won't rebuild a corrupt directory and cloning a corrupt drive usually won't fix corrupt files or result in a backup you can use with confidence.


I see few complaints about Diskwarrior vs. the number of times it has worked for somebody. As with any problem, those few who have had problems are very vocal.

Nov 13, 2012 9:49 AM in response to nad2.0

Here's a older posts but I think it provides useful background:


Apple KBase article About disk optimization with Mac OS X - http://docs.info.apple.com/article.html?artnum=25668


Different views about defragmentation:


Optimizing Disks Is a Waste of Time - http://db.tidbits.com/article/7254


Macintosh OS X Routine Maintenance - http://www.macattorney.com/ts.html#Anchor-31774


The links above also have links to specific tools you can use. Here's a short list:

iDefrag

SpeedToolsX

Drive Genius

DiskWarrior defragments just the Directory

Show Volume Fragmentation - http://www.macupdate.com/info.php/id/18451/showvolumefragmentation (free, just shows fragmentation stats.)


There is a difference between defragmentation and optimizing. Defragmentation results in pieces of files or free space occupying contiguous areas (puts them together so they are next to each other and "whole"). Optimizing puts things in a specific order that supposedly makes them easier to which to get access. Techtool has a defragmentation feature. idefrag also does optimizing.


There's also two types of fragmentation; file fragmentation and free space fragmentation. You could have files that are contiguous but the free space may be broken up into tiny bits making it almost useless for file storage, or the reverse. SpeedTools does file defragmentation but does not defragment the resulting free space.


"Tiger automatically defragments files smaller than 20MB." This is a statement copied from somewhere but I have checked my drive and found 2MB files that were fragmented when there was sufficient contiguous space for them not to be fragmented.


More discussion on defragmentation - http://discussions.apple.com/thread.jspa?threadID=1826622


March 2010 post by Klaus1 with extensive discussion of fragmentation - http://discussions.apple.com/message.jspa?messageID=11247504 Also read


Extensive discussion about defragmentation, also questioning the effectiveness of cloning as a defragmentation process. - http://discussions.apple.com/thread.jspa?threadID=1962935 Also read http://discussions.apple.com/thread/2724515?answerId=12961331022#12961331022 which has a case study of the effectiveness of file defragmenting and cloning.


I think the bottom line is, unless you have pushed your drive to extremes in terms of large file creation with very little free space you probably don't have to worry about fragmentation.

Nov 13, 2012 11:10 AM in response to VikingOSX

VikingOSX wrote:

I know that the mention of DiskWarrior evokes great gnashing of teeth and clamoring within the community, especially by those that swear by Carbon Copy Cloner.

Huh? You know that how? I use and recommend both throughout these OS forums. DW supplements Disk Utility, which has rudimentary, if any, disk directory fixing tools; whereas, DW is the gold standard for fixing disk directory issue. CCC is, IMO, the best backup/cloning tool available. There aren't any issues WRT to disk directory problems if the target disk and its volume are prepared properly.

Defragmenter Utility?

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