lweileman

Q: 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

Close

Q: how to do a disk defragment on a mac book

  • All replies
  • Helpful answers

Previous Page 2 of 6 last Next
  • by Chewyid,

    Chewyid Chewyid Jul 11, 2012 8:30 PM in response to cmelbourne91
    Level 1 (0 points)
    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.""

  • by callummance,

    callummance callummance Jul 28, 2012 10:08 AM in response to cmelbourne91
    Level 1 (0 points)
    Jul 28, 2012 10:08 AM in response to cmelbourne91

    So Charles Babbage's difference engine runs Windows?

     

    I'm confused...

  • by RobotPi,

    RobotPi RobotPi Jul 28, 2012 10:19 AM in response to lweileman
    Level 1 (55 points)
    Jul 28, 2012 10:19 AM in response to lweileman

    OSX will automatically, as a background process, defragment files under 20mb in size. Files over 20mb are never defragmented and nor does OSX make any effort to prevent directory defragmentation. Both can result fragemented free space across the drive which can affect performance given enough use.

     

    The easy/cheap way to defragment an OSX drive is move as many of the large files off the drive as you possiblycan then let OSX make the best job it can of defragmenting all the sub-20mb files. Once done, copy all the other files back. Or you could use a tool like iDefrag - http://www.coriolis-systems.com/iDefrag.php

     

    The benefit of using such tools is highly contentious. I've found that iDefrag can noticeably improve the performance of HDDs that get a huge amount of write/re-write activity of large (20mb+) files, but your mileage may vary. Defragmenting OSX is certainly notwhere near as much of a problem as it is on Microsoft's platform.

  • by ds store,

    ds store ds store Jul 28, 2012 11:21 AM in response to lweileman
    Level 7 (30,395 points)
    Jul 28, 2012 11:21 AM in response to lweileman

    I guess I should weigh in here

     

     

    1: Only hard drives require defragging. SSD's no need.

     

    2: You don't need to regularly defrag a Mac's hard drive, OS X writes small files in one batch, eliminating a lot of the need to defrag a Mac regularly.

     

    3: Hard drives are fastest at the beginning of the drive.

     

    4: The first 50% of the drive is faster than the second 50% due to larger sectors and longer tracks which the heads have less to move and can gather more data at one time.

     

    5: However over time a Mac can slow down as the adding and reduction of data, OS X upgrades and normal operation tends to move data making it less optimized.

     

    6: If one wants to create a Bootcamp or second partition on the boot drive, there might be OS X data near the bottom where the second partition will go, it's sometimes not easy to move this data further up on the drive.

     

    7: If there are bad or failing sectors on the drive, it can substantially slow down read speeds and the spinning beach ball effect occurs.


    8: I don't advise using defragmentation software on a "live" system. If anyone has defragged a PC before knows it's never really complete in actuality.

     

     

    So my solution if your serious about performance, have large files like video that stretch across many sectors and want it in one piece, want to reduce bad sectors that can corrupt large and even small files, need to free up space for a patition or large file.

     

    (Note: If you have Filevault enabled, forget it, I can't confirm if this will work or not with this proceedure, consider not using it as it slows down a machine anyway and is currently cracked.)

     

     

    Reduce your boot drive user content so it's less than 50% of the drive filled (ideal) but not more than 80% filled.

     

    Use a blank powered external drive and a copy of Carbon Copy Cloner to clone the OS X boot partition (aka Macintosh HD) to the external drive.

     

    The reboot the machine holding the option key down, you can boot from the clone.

     

    Use Disk Utility to Secure Option Erase with the "Zero" or middle secure selection (10.7/10.8) the internal OS X boot partition, this will "Zero" out all the bits, and when it reads it back for confirmation, map off any bad sectors in the process, never to be written to again.

     

    When completed, reverse clone. Run Disk Utility > Repair Permissions on both and all the OnyX (Macupdate.com) maintenance and cleaning aspects and reboot. OnyX cleans out the caches and lets them rebuild.

     

     

    You will solve your Bootcamp partition formatting problem, your bad sectors problem, your defrag problems, corrupt or bloated caches and your optimization problems all in one batch. Also have a working bootable backup in the process which is loads safer than a live defrag.

     

    Your Applicaiton's will be written to the "hot zone" the fastest part of the drive. They will load as fast as possible.

     

    Your OS X system files will be written next, followed by your User account data last which tends to grow, expand and contact, suffer with more changes so the defragmentation that occurs will occur at the end and into the slow sections of the hard drive, not where Applications and System are.

     

    Sure over time with OS X updates, upgrades, new app installs and such you can start seeing a loss in performance again (over many years), but another clone/reverse clone will solve that problem.

     

    Also if you want to backup and defrag Windows Bootcamp partiton (CCC doesn't do that), there is WinClone for that. I don't know how effective it is as I haven't used it.

  • by ds store,

    ds store ds store Jul 28, 2012 11:36 AM in response to lweileman
    Level 7 (30,395 points)
    Jul 28, 2012 11:36 AM in response to lweileman

    Well I placed all that information of my last post in this User Tip, this way I can edit it if need be.

     

    How to properly defrag a Mac's hard drive

  • by zygomac,

    zygomac zygomac Sep 20, 2012 10:00 AM in response to ds store
    Level 1 (0 points)
    Sep 20, 2012 10:00 AM in response to ds store

    Hi Everyone. Some interesting information on this discussion thread. I would welcome your thoughts on a slight twist to the defrag question.

     

    I use a MacBook Air with 128GB SSD. I do have to support some software which runs (walks) on windoze. So I use Parallels to run a couple of Virtual Machines (Win XP Home and Win 7 Pro), which are clones of my old PCs.

     

    As I only have 128GB I find I have to store the VM files on a network drive (because they were about 40GB each). I have 100Mbps connection so whilst it's slow to access them. It's not impossible. Naturally I would love to use the SSD of the MacBook Air and so I have recently cleaned up one of the VMs and removed loads of programs from windows, deleted old data etc. I got the size down to 20GB and so it's capable of copying the whole VM to the MBA and running it locally.

     

    Naturally I wonderred what the impact of Defrag would be for both the VM which is being served over the network, and the VM which would be on the MBA's SSD.

     

    Thought this might add an interesting twist to the conversation thread. Thoughts and opinions are welcome.

     

    Regards,

     

    Zygomac

  • by scarroll,

    scarroll scarroll Sep 20, 2012 11:00 AM in response to lweileman
    Level 1 (0 points)
    Sep 20, 2012 11:00 AM in response to lweileman

    Don't believe the hype. "Until the hard drive is near full"? Well, that might include you! If you do a lot of VM, Video, or just have a near full drive, you might start to see permormance loss (I did).

     

    If you run a Carbon Copy Cloner to an external drive, then boot off of it, erase your internal and Carbon Copy Cloner back, YOU WILL see a performance increase. This WILL defrag your drive. There are third party products out there but it's a shame that OS X doesn't include a native app to do this.

  • by Csound1,

    Csound1 Csound1 Sep 20, 2012 2:24 PM in response to scarroll
    Level 9 (50,786 points)
    Desktops
    Sep 20, 2012 2:24 PM in response to scarroll

    scarroll wrote:

     

    Don't believe the hype. "Until the hard drive is near full"? Well, that might include you! If you do a lot of VM, Video, or just have a near full drive, you might start to see permormance loss (I did).

     

    If you run a Carbon Copy Cloner to an external drive, then boot off of it, erase your internal and Carbon Copy Cloner back, YOU WILL see a performance increase. This WILL defrag your drive. There are third party products out there but it's a shame that OS X doesn't include a native app to do this.

    Do what? clone?

     

    Disk Utility does that very well.

  • by davscanlon,

    davscanlon davscanlon Sep 20, 2012 2:32 PM in response to zygomac
    Level 2 (220 points)
    Sep 20, 2012 2:32 PM in response to zygomac

    220px-FragmentationDefragmentation.gif

     

    Disk Fragmentation and de-fragmentaion explained with a pretty gif

     

    OSX handles this process automatically, Windows doesn't.

     

    I think I got it right??

     

    Also, am I right in thinking SSD's dont fragment as they are "digital" ? Laymens terms please

  • by Csound1,

    Csound1 Csound1 Sep 20, 2012 2:34 PM in response to davscanlon
    Level 9 (50,786 points)
    Desktops
    Sep 20, 2012 2:34 PM in response to davscanlon

    All drives in a mac, solid state or hard, are digital.

  • by davscanlon,

    davscanlon davscanlon Sep 20, 2012 2:43 PM in response to Csound1
    Level 2 (220 points)
    Sep 20, 2012 2:43 PM in response to Csound1

    I meant the physical location where it saves, an actual physical disk vs circuit boards.

     

    I goooooooooogle it

     

    Wikipedia:

    Left SSD, right Hard Disk Drive

    There is no benefit to reading data sequentially (beyond typical FS block sizes), making fragmentation irrelevant for SSDs. Defragmentation would cause wear by making additional writes of the NAND flash cells, which have a limited cycle life.[73][74]Files, particularly large ones, on HDDs usually become fragmented over time if frequently written; periodic defragmentation is required to maintain optimum performance.[75]

     

    So back to OP, defragmentation of your MacBook Air SSD would be irrelavant.

  • by Csound1,

    Csound1 Csound1 Sep 20, 2012 2:38 PM in response to davscanlon
    Level 9 (50,786 points)
    Desktops
    Sep 20, 2012 2:38 PM in response to davscanlon

    davscanlon wrote:

     

    I meant the physical location where it saves, an actual physical disk vs circuit boards.

     

    I goooooooooogle it

    I will know what you mean only if you say what you mean and not some other thing.

  • by davscanlon,

    davscanlon davscanlon Sep 20, 2012 2:46 PM in response to Csound1
    Level 2 (220 points)
    Sep 20, 2012 2:46 PM in response to Csound1

    I meant to say SSD's don't fragment as they use flash cells, so don't have to be read sequentially as apposed to a disk?

     

    I mis-used the word "digital", i meant "flash technology"

  • by Csound1,

    Csound1 Csound1 Sep 20, 2012 2:48 PM in response to davscanlon
    Level 9 (50,786 points)
    Desktops
    Sep 20, 2012 2:48 PM in response to davscanlon

    davscanlon wrote:

     

    I meant to say SSD's don't fragment as they use flash cells, so don't have to be read sequentially as apposed to a disk?

     

    I mis-used the word "digital", i meant "flash technology"

    I meant to read what you meant to say, but read what you said by mistake, I'll remember not to in future.

  • by davscanlon,

    davscanlon davscanlon Sep 20, 2012 3:11 PM in response to Csound1
    Level 2 (220 points)
    Sep 20, 2012 3:11 PM in response to Csound1

    You should telepathic by now with all those points, jeeze !

     

    Joking aside, I will read what I'm meant to say before I write what I'm not meant to say in future ha

Previous Page 2 of 6 last Next