Free Defragmentation Software For Mac
Defraggler, the award-winning hard drive defrag tool from the makers of CCleaner. Optimize your hard drive and free up space. Download the latest version for free. You could pay $30 for iDefrag or other software to defragment your hard drive. Or you can do it for free and it takes about the same amount of time and it's. You could pay $30 for iDefrag or other software to defragment your hard drive. Or you can do it for free and it takes about the same amount of time and it's.
In the maintenance of file systems, defragmentation is a process that reduces the degree of fragmentation. It does this by physically organizing the contents of the mass storage device used to store files into the smallest number of contiguous regions (fragments, extents). It also attempts to create larger regions of free space using compaction to impede the return of fragmentation. Some defragmentation utilities try to keep smaller files within a single directory together, as they are often accessed in sequence.
Defragmentation is advantageous and relevant to file systems on electromechanical disk drives (hard disk drives, floppy disk drives and optical disk media). The movement of the hard drive's read/write heads over different areas of the disk when accessing fragmented files is slower, compared to accessing the entire contents of a non-fragmented file sequentially without moving the read/write heads to seek other fragments.
Causes of fragmentation[edit]
Fragmentation occurs when the file system cannot or will not allocate enough contiguous space to store a complete file as a unit, but instead puts parts of it in gaps between existing files (usually those gaps exist because they formerly held a file that the file system has subsequently deleted or because the file system allocated excess space for the file in the first place). Files that are often appended to (as with log files) as well as the frequent adding and deleting of files (as with emails and web browser cache), larger files (as with videos) and greater numbers of files contribute to fragmentation and consequent performance loss. Defragmentation attempts to alleviate these problems.
Example[edit]
An otherwise blank disk has five files, A through E, each using 10 blocks of space (for this section, a block is an allocation unit of the filesystem; the block size is set when the disk is formatted and can be any size supported by the filesystem). On a blank disk, all of these files would be allocated one after the other (see example 1 in the image). If file B were to be deleted, there would be two options: mark the space for file B as empty to be used again later, or move all the files after B so that the empty space is at the end. Since moving the files could be time-consuming if there were many files which needed to be moved, usually the empty space is simply left there, marked in a table as available for new files (see example 2 in the image).[1] When a new file, F, is allocated requiring 6 blocks of space, it could be placed into the first 6 blocks of the space that formerly held file B, and the 4 blocks following it will remain available (see example 3 in the image). If another new file, G, is added and needs only 4 blocks, it could then occupy the space after F and before C (example 4 in the image).
However, if file F then needs to be expanded, there are three options, since the space immediately following it is no longer available:
- Move the file F to where it can be created as one contiguous file of the new, larger size. This would not be possible if the file is larger than the largest contiguous space available. The file could also be so large that the operation would take an undesirably long period of time.
- Move all the files after F until one opens enough space to make it contiguous again. This presents the same problem as in the previous example: if there are a small number of files or not much data to move, it isn't a big problem, but if there are thousands or even tens of thousands of files, there isn't enough time to move all those files.
- Add a new block somewhere else, and indicate that F has a second extent (see example 5 in the image). Repeat this hundreds of times and the filesystem will have a number of small free segments scattered in many places, and some files will have multiple extents. When a file has many extents like this, access time for that file may become excessively long because of all the random seeking the disk will have to do when reading it.
Additionally, the concept of “fragmentation” is not only limited to individual files that have multiple extents on the disk. For instance, a group of files normally read in a particular sequence (like files accessed by a program when it is loading, which can include certain DLLs, various resource files, the audio/visual media files in a game) can be considered fragmented if they are not in sequential load-order on the disk, even if these individual files are not fragmented; the read/write heads will have to seek these (non-fragmented) files randomly to access them in sequence. Some groups of files may have been originally installed in the correct sequence, but drift apart with time as certain files within the group are deleted. Updates are a common cause of this, because in order to update a file, most updaters usually delete the old file first, and then write a new, updated one in its place. However, most filesystems do not write the new file in the same physical place on the disk. This allows unrelated files to fill in the empty spaces left behind.
Mitigation[edit]
Defragmentation is the operation of moving file extents (physical allocation blocks) so they eventually merge, preferably into one. Doing so usually requires at least two copy operations: one to move the blocks into some free scratch space on the disk so more movement can happen, and another to finally move the blocks into their intended place. In such a paradigm, no data is ever removed from the disk, so that the operation can be safely stopped even in the event of a power loss. The article picture depicts an example.
To defragment a disk, defragmentation software (also known as a 'defragmenter') can only move files around within the free space available. This is an intensive operation and cannot be performed on a filesystem with little or no free space. During defragmentation, system performance will be degraded, and it is best to leave the computer alone during the process so that the defragmenter does not get confused by unexpected changes to the filesystem. Depending on the algorithm used it may or may not be advantageous to perform multiple passes. The reorganization involved in defragmentation does not change logical location of the files (defined as their location within the directory structure).
Besides defragmenting program files, the defragmenting tool can also reduce the time it takes to load programs and open files. For example, the Windows 9x defragmenter included the Intel Application Launch Accelerator which optimized programs on the disk by placing the defragmented program files and their dependencies next to each other, in the order in which the program loads them, to load these programs faster.[2] In Windows, a good defragmenter will read the Prefetch files to identify as many of these file groups as possible and place the files within them in access sequence.
At the beginning of the hard drive, the outer tracks have a higher data transfer rate than the inner tracks. Placing frequently accessed files onto the outer tracks increases performance.[3] Third party defragmenters, such as MyDefrag, will move frequently accessed files onto the outer tracks and defragment these files.[4]
Improvements in modern hard drives such as RAM cache, faster platter rotation speed, command queuing (SCSI/ATATCQ or SATANCQ), and greater data density reduce the negative impact of fragmentation on system performance to some degree, though increases in commonly used data quantities offset those benefits. However, modern systems profit enormously from the huge disk capacities currently available, since partially filled disks fragment much less than full disks,[5] and on a high-capacity HDD, the same partition occupies a smaller range of cylinders, resulting in faster seeks. However, the average access time can never be lower than a half rotation of the platters, and platter rotation (measured in rpm) is the speed characteristic of HDDs which has experienced the slowest growth over the decades (compared to data transfer rate and seek time), so minimizing the number of seeks remains beneficial in most storage-heavy applications. Defragmentation is just that: ensuring that there is at most one seek per file, counting only the seeks to non-adjacent tracks.
Partitioning[edit]
A common strategy to optimize defragmentation and to reduce the impact of fragmentation is to partition the hard disk(s) in a way that separates partitions of the file system that experience many more reads than writes from the more volatile zones where files are created and deleted frequently. The directories that contain the users' profiles are modified constantly (especially with the Temp directory and web browser cache creating thousands of files that are deleted in a few days). If files from user profiles are held on a dedicated partition (as is commonly done on UNIX recommended files systems, where it is typically stored in the /var partition), the defragmenter runs better since it does not need to deal with all the static files from other directories. (Alternatively, a defragmenter can be told to simply exclude certain file paths.) For partitions with relatively little write activity, defragmentation time greatly improves after the first defragmentation, since the defragmenter will need to defragment only a small number of new files in the future.
Offline defragmentation[edit]
The presence of immovable system files, especially a swap file, can impede defragmentation. These files can be safely moved when the operating system is not in use. For example, ntfsresize moves these files to resize an NTFS partition. The tool PageDefrag could defragment Windows system files such as the swap file and the files that store the Windows registry by running at boot time before the GUI is loaded. Since Windows Vista, the feature is not fully supported and has not been updated.
In NTFS, as files are added to the disk, the Master File Table (MFT) must grow to store the information for the new files. Every time the MFT cannot be extended due to some file being in the way, the MFT will gain a fragment. In early versions of Windows, it could not be safely defragmented while the partition was mounted, and so Microsoft wrote a hardblock in the defragmenting API. However, since Windows XP, an increasing number of defragmenters are now able to defragment the MFT, because the Windows defragmentation API has been improved and now supports that move operation.[6] Even with the improvements, the first four clusters of the MFT remain unmovable by the Windows defragmentation API, resulting in the fact that some defragmenters will store the MFT in two fragments: The first four clusters wherever they were placed when the disk was formatted, and then the rest of the MFT at the beginning of the disk (or wherever the defragmenter's strategy deems to be the best place).
Solid-state disks[edit]
When reading data from a conventional electromechanical hard disk drive, the disk controller must first position the head, relatively slowly, to the track where a given fragment resides, and then wait while the disk platter rotates until the fragment reaches the head. A solid-state drive (SSD) is based on flash memory with no moving parts, so random access of a file fragment on flash memory does not suffer this delay, making defragmentation to optimize access speed unnecessary. Furthermore, since flash memory can be written to only a limited number of times before it fails, defragmentation is actually detrimental (except in the mitigation of catastrophic failure). However, Windows still defragments a SSD automatically (albeit less vigorously) to prevent the file system from reaching its maximum fragmentation tolerance. Once the maximum fragmentation limit is reached, subsequent attempts to write to disk fail.[7]
Approach and defragmenters by file-system type[edit]
- FAT: MS-DOS 6.x and Windows 9x-systems come with a defragmentation utility called Defrag. The DOS version is a limited version of Norton SpeedDisk.[8] The version that came with Windows 9x was licensed from Symantec Corporation, and the version that came with Windows 2000 and XP is licensed from Condusiv Technologies.
- NTFS was introduced with Windows NT 3.1, but the NTFS filesystem driver did not include any defragmentation capabilities.[9] In Windows NT 4.0, defragmenting APIs were introduced that third-party tools could use to perform defragmentation tasks; however, no defragmentation software was included. In Windows 2000, Windows XP and Windows Server 2003, Microsoft included a defragmentation tool based on Diskeeper[10] that made use of the defragmentation APIs and was a snap-in for Computer Management. In Windows Vista, Windows 7 and Windows 8, the tool has been greatly improved and was given a new interface with no visual diskmap and is no longer part of Computer Management.[11][12] There are also a number of free and commercial third-party defragmentation products available for Microsoft Windows.
- BSDUFS and particularly FreeBSD uses an internal reallocator that seeks to reduce fragmentation right in the moment when the information is written to disk.[13] This effectively controls system degradation after extended use.
- Btrfs has online and automatic defragmentation available.[14]
- Linuxext2, ext3, and ext4: Much like UFS, these filesystems employ allocation techniques designed to keep fragmentation under control at all times.[15] As a result, defragmentation is not needed in the vast majority of cases.[16] ext2 uses an offline defragmenter called
e2defrag
, which does not work with its successor ext3. However, other programs, or filesystem-independent ones such as defragfs,[17] may be used to defragment an ext3 filesystem. ext4 is somewhat backward compatible with ext3, and thus has generally the same amount of support from defragmentation programs. Currently e4defrag can be used to defragment an ext4 filesystem, including online defragmentation. - VxFS has the
fsadm
utility that includes defrag operations. - JFS has the
defragfs
utility on IBM operating systems.[18] - HFS Plus introduced in 1998 with Mac OS 8.1 has a number of optimizations to the allocation algorithms in an attempt to defragment files while they are being accessed without a separate defragmenter.[19] There are several restrictions for files to be candidates for 'on-the-fly' defragmentation (including a maximum size 20MB). There is a utility, iDefrag, by Coriolis Systems available since OS X 10.3. On traditional Mac OS defragmentation can be done by Norton SpeedDisk and TechTool Pro.
- WAFL in NetApp's ONTAP 7.2 operating system has a command called
reallocate
that is designed to defragment large files. - XFS provides an online defragmentation utility called
xfs_fsr
. - SFS processes the defragmentation feature in almost completely stateless way (apart from the location it is working on), so defragmentation can be stopped and started instantly.[20]
- ADFS, the file system used by RISC OS and earlier Acorn Computers, keeps file fragmentation under control without requiring manual defragmentation.[21]
See also[edit]
- Wear leveling, a similar technique for prolonging flash memory content
References[edit]
- ^The practice of marking the now unused space of a deleted file in a table as available for later use (without erasing its contents), is why undelete programs are able to work; they recover files whose names have been deleted from the directory, but whose space has not yet been reused.
- ^Cwdixon.comArchived 2010-10-06 at the Wayback Machine. Cwdixon.com. Retrieved on 2013-07-28.
- ^The Ultimate Defragger - LaRud's Place. Larud.net (2012-01-19). Retrieved on 2013-07-28.
- ^'Archived copy'. Archived from the original on 2010-02-16. Retrieved 2014-08-14.CS1 maint: archived copy as title (link) On most hard disks the beginning of the hard disk is considerably faster than the end, sometimes by as much as 200 percent! You can measure this yourself with utilities such as HD Tune. MyDefrag is therefore geared towards moving all files to the beginning of the disk.
- ^Serdar Yegulalp (20 September 2005). 'New hard disk drives reduce need for disk defragmentation'. SearchWindowsServer.com: Disk Defragmentation Fast Guide. Archived from the original on 3 June 2008. Retrieved 2008-12-27.
- ^'Archived copy'. Archived from the original on 2003-04-24. Retrieved 2006-12-19.CS1 maint: archived copy as title (link) msdn.microsoft.com: 'The other big enhancement [in windows XP] is support for online defragmentation of the MFT and most directory and file metadata'
- ^Hanselman, Scott (3 December 2014). 'The real and complete story - Does Windows defragment your SSD?'. Scott Hanselman's blog. Microsoft. Archived from the original on 22 December 2014.
- ^Norton, Peter (October 1994). Peter Norton's Complete Guide to DOS 6.22. Sams. p. 521.
- ^M. Kozierok, Charles (2001-04-17). 'NTFS Versions'. PC Guide. Archived from the original on 2015-09-24. Retrieved 2015-02-20.
- ^Third-party disk defragmenter tools for WindowsArchived 2011-11-28 at the Wayback Machine. Support.microsoft.com (2011-08-23). Retrieved on 2013-07-28.
- ^'Disk Defragmentation – Background and Engineering the Windows 7 Improvements'. Archived from the original on 2014-06-13. Retrieved 2014-06-15.
- ^'New Defrag options in Windows 8'. Archived from the original on 2015-02-20. Retrieved 2014-06-15.
- ^'FreeBSD Man Pages'. The FreeBSD Project. Archived from the original on 21 February 2015. Retrieved 21 February 2015.
- ^'Linux kernel 3.0, Section 1.1. Btrfs: Automatic defragmentation, scrubbing, performance improvements'. kernelnewbies.org. 2011-07-21. Archived from the original on 2016-03-30. Retrieved 2016-04-05.
- ^'HTG Explains: Why Linux Doesn't Need Defragmenting'. How-To Geek. Archived from the original on 2013-07-19. Retrieved 2013-08-01.
- ^5.10. FilesystemsArchived 2013-05-27 at the Wayback Machine. Tldp.org (2002-11-09). Retrieved on 2013-06-22.
- ^Erik Bärwaldt: Optimizing data organization on diskArchived 2014-09-06 at the Wayback Machine
- ^'Journaling File System Support'. eComStation. Archived from the original on 2008-12-08. Retrieved 2008-12-27.
- ^'Fragmentation in HFS Plus Volumes'. Archived from the original on 18 November 2012. Retrieved 2 September 2020.
As we have seen, an HFS+ volume seems to resist fragmentation rather well on Mac OS X 10.3.x, and I don't envision fragmentation to be a problem bad enough to require proactive remedies (such as a defragmenting tool).
- ^'Detecting a file fragmentation point for reconstructing fragmented files using sequential hypothesis testing'. US8407192 B2. Archived from the original on 21 February 2015. Retrieved 21 February 2015.
- ^Reeves, Nick (26 October 1990). 'E format design document'. Archived from the original on 7 April 2013. Retrieved 24 May 2013.
Sources[edit]
- Norton, Peter (1994) Peter Norton's Complete Guide to DOS 6.22, page 521 – Sams (ISBN067230614X)
- Woody Leonhard, Justin Leonhard (2005) Windows XP Timesaving Techniques For Dummies, Second Edition page 456 – For Dummies (ISBN0-764578-839).
- Jensen, Craig (1994). Fragmentation: The Condition, the Cause, the Cure. Executive Software International (ISBN0-9640049-0-9).
- Dave Kleiman, Laura Hunter, Mahesh Satyanarayana, Kimon Andreou, Nancy G Altholz, Lawrence Abrams, Darren Windham, Tony Bradley and Brian Barber (2006) Winternals: Defragmentation, Recovery, and Administration Field Guide – Syngress (ISBN1-597490-792)
- Robb, Drew (2003) Server Disk Management in a Windows Environment Chapter 7 – AUERBACH (ISBN0849324327)
External links[edit]
- The Big Windows 7 Defragmenter Test Benchmarks of popular defrag utilities
You might be experiencing some performance issues with your Mac, and you knew from your PC days about defragging computers. Well, you won’t find any command or utility to do that on Mac. The point is that the Mac File System is designed differently than Microsoft's, and it defragments files automatically. However, there are still some situations when you may need to defrag Macbook once in a few years.
In this article, we’ll tell you how to defrag a Mac, all advantages and pitfalls of doing this, and what alternatives to defragging are out there. Anxious to find out? Then let’s start!
Do you need to defragment a Mac?
First of all, let’s find out why we do a Mac disk defrag. To cut a long story short, defragmentation aims to boost a computer’s performance by reorganizing the data on your drive. As a result, the related bits are grouped, and loading files and programs take less time. Simply put, Mac defragment moves everything back in order and can greatly speed up a slow system.
However, despite the obvious advantage, a Mac running any OS X version later than 10.2 generally doesn’t need to be defragmented. This is because OS X and macOS have their own built-in Apple Mac utilities that clean up fragmented files from the hard drive. Therefore, for most users, it eliminates the need to perform a regular defrag. But there is an exception to every rule, and in a few rare cases, a defrag for Mac can make a difference.
When do Macs need to be defragged?
If your hard drive is more than 90 percent full, the macOS may have problems with automatic defragmentation routines. This situation is common for multimedia creators who produce plenty of large files in pro tools like Adobe Premiere, Final Cut, or Photoshop.
Therefore, if you have hundreds or even thousands of large (1GB and larger) movies, audio files, or creative documents, you should consider removing them to free up the storage. Another alternative is defragging a Mac.
Concerning the first option, there is a fast and safe way to remove unnecessary files from your Mac — a powerful app CleanMyMac X. It finds above 74 GB of junk on an average computer, including old and large files, app leftovers, and system clutter. It helps to boost computer performance, so you probably won’t even need to defrag a Mac.
However, if you still wonder, “How do I defrag my Mac?” read on. We’ve prepared all the essential guidelines for you.
How to defragment a Mac
One of the simplest and most user-friendly Mac defrag methods is to use a trusted third-party defragmentation program. But before choosing and installing the app, make sure to back up your data. Should something go wrong, you’ll be able to restore all necessary files easily. You can use Time Machine, iCloud, Dropbox, or any other external storage at hand for this purpose.
When choosing the defragmentation app, pay special attention to the compatibility requirements. Macs running operating systems older than OS X 10.2 are not compatible with the latest modern defragmentation software, so finding a relevant tool is challenging.
Once you’ve installed the program of your choice, open the utility and follow the instructions of a disk defragmenter for Mac. Give the process plenty of time to complete without moving your computer anywhere until the defragmentation is finished. Usually, you’ll need to restart your Mac as well.
Will defragmentation harm my HDD?
You may not worry: OS X defrag will not harm your HDD. As you already know, disk defragmentation can greatly speed up the traditional hard drive. It’s because HDD fragments all the data and stores it in multiple locations. And it may take quite a time to read the file with its pieces situated in different places. The procedure for arranging the data is not harmful to your HDD and aims to boost the computer’s performance. And while it is not advisable to turn to such extreme measures, defragmenting a hard drive disk is a safe procedure if, of course, performed accurately.
Why you should never defrag Mac’s SSD
The process described above is applied only to the hard drives. If you have a newer Mac with SSD (solid-state drive), you should never defrag its data. SSDs operate in a different way to a traditional HDD and already have a built-in automatic maintenance process. Therefore, it is not necessary to defrag a solid-state drive to boost Mac’s performance.
Furthermore, all defragmentation attempts can even hurt your SSD. Flash memory used by a solid-state drive has a finite lifespan because of the limited write and read cycles. And disk defragmentation is a process of reading the data from one place and writing it to another. So if you defrag SSD, you will perform thousands of write operations each time on the drive. It can speed up the degradation of a solid-state drive and lead to its wear and tear. And that’s not what you need.
What are alternatives to defragment a Mac?
If your Mac is running slowly, you don’t necessarily need to defrag Mac hard drive. Sometimes it’s not your HDD that’s having problems. Therefore, try some alternative methods that may help you speed up the system without disk defrag on Mac.
Repairing Disk Permissions
“Try repairing your disk permissions” is a standard Mac troubleshooting tip. Permissions are file settings that affect the ability to read, write, and execute the file. And if they are no longer set correctly, software that uses the file may not work right.
In OS X Yosemite or earlier, the file permissions on a startup disk can be repaired with the help of Disk Utility. Note that beginning from OS X EI Capitan, disk permissions are automatically protected, and there is no need to verify them with Disk Utility.
How do I repair my Mac startup disk?
Here are the steps for optimizing your Mac:
Open Disk Utility (Applications > Utilities).
Choose your startup disk.
Click the First Aid tab.
Click Verify Disk Permissions to check permissions.
Click Repair Disk Permissions to repair any inconsistent permissions.
If you don’t want to repair disk permissions manually, you can easily perform the action with the utility we mentioned above — CleanMyMac X. It has the Maintenance module that will help you optimize your Mac, including verifying startup disk and repairing disk permissions. Thus, you’ll ensure that your Mac’s operating system is functioning properly. You can download CleanMyMac here.
Therefore, before defragging your Mac, try to perform the Mac disk cleanup to increase the disk speed. It’s an easy and risk-free process that will not take more than a few minutes.
General speedup tips
Sometimes your Mac needs a good kick-start to run smoothly. Here are some tricks to speed up your computer.
Idefrag License
How do I improve my Mac performance?
1. Update macOS software
Try to update your software to the latest versions as it performs better than the previous ones. Usually, system updates include performance and bug fixes that could be the reason for slowdowns.
2. Delete unnecessary files
Ensure that your Mac has at least 10 percent of total drive storage available at any time to perform background actions and provide enough space for temporary files, caches, and virtual memory. Once again, CleanMyMac X is a great solution for finding and removing useless and large files that take gigabytes of space on your Mac.
3. Stop programs from launching automatically
A large number of apps may launch simultaneously when you turn your Mac on. Some of them run in the background and are only visible in a menu bar, so it’s even hard to define if they’re actually running. You can stop them from loading by opening System Preferences, clicking on Users & Groups, and choosing Login Items. You’ll see a list of applications that launch during the startup. You can switch off the ones you don’t need by clicking the minus sign (-) button.
How To Defrag A Mac
If you’re looking for some utilities that can help with all of that and even more, try Mac maintenance software like CleanMyMac X, It will optimize Mac performance safely and quickly.
Idefrag
We hope this article was helpful, and you found the answers to all your questions here. Thanks for reading and share this article if you liked it!