Defragmentinga hard drive can improve a computer's or laptop's performance and speed. To reduce fragmentation, a disk optimization tool typically uses compaction to free up larger areas of space. Certain disk defragmentation tools might try to keep smaller files together, especially if they're often accessed sequentially.
Fragmentation doesn't happen as much in Linux-based file systems as the Linux journaling system stores the data across multiple locations in the disk and automatically moves it around as soon as it senses fragmentation.
Defragmentation can solve and mitigate problems, such as slow speeds, freeze-ups and extended boot times of a computer. If there's not enough contiguous space to hold complete files on an HDD, files can become fragmented and the storage algorithms on the disk separate the data to fit it inside the available space. Defragmentation consolidates these fragmented files so all the related pieces are aligned together.
A fragmented hard drive is similar to a huge, jumbled-up load of laundry, where all the different clothing types and colors are mixed up. Once the HDD is defragmented, the system performance improves because all the jumbled-up data is reorganized and stored appropriately.
Most contemporary operating systems have built-in disk defragmentation tools that perform the defragmentation process automatically. However, some operating systems, such as Microsoft Windows 7 and beyond, can be defragmented manually.
Since modern versions of both Windows and macOS come with built-in optimization tools, there's no need to manually perform defragmentation, especially if the computer is on all the time. However, if a device is routinely shut down after each use, its built-in defragmentation utilities might be prevented from running automatically.
I've stopped defragmenting my Windows 7 systems manually because it's automatic. My Windows XP systems use the last available version of JkDefrag - it runs portably (which is useful since in some cases, I go into a service call, and magically fix a slow computer by defragging it), I can set it as a screensaver, and it's simple. On the other hand, the newer version, MyDefrag is scriptable, and can be run on a schedule.
They are all going to have more features than the standard Win defrag utility, because it's not a highly developed or frequently updated product. I think a lot of the choice is going to come down to personal preference and bundled features.
For example I use Auslogics because it allows me to optimize my hard disks to different profiles while I am de-fragmenting them. It performs this optimization by moving files you wish to access faster to the centre of your hard disk - which means less time is needed to read the data because it's closer together.
To answer the question "How can I tell" I would suggest checking out the overviews of each product to see what features they contain that you'd want to use. You could also check search engines for benchmarking information, but performance speed doesn't seem important factor for a defragger to me. I leave them on overnight anyway.
Better? Well there's many discussions about this but I would like to stress on the fact that fragmentation have an impact on system performances only when you have to read often files such as Web Browser's cache for example but have no impact on performances for files such as Restore Points which, most of the time, are never to be read (unless you have to restore and for one time only...).
You have to know that Ultradefrag do not use complex algorithms for defragmentations like JKDefrag ot other softwares but it's easy to use and give reasonable results... There's a GUI and command lines options with a (very) good documentation.
Ultradefrag may be run at boot time and run as command line for targeted defragmentation. For example you may keep the various command lines in a scheduled task and keep it disabled to run it only on demand if you want...
I personally recommend Defraggler. It's simple, has all options one would look for but comes with a great default setup so you also can simply click defrag and wait. It can also completely replace the Windows 7 default defrag-algorithm and is updated on a six weeks cycle, so it will always be up to date.
I'm looking for a tool that can give me a visual representation of my ext4 fragmentation. Something similar to how Defraggler, Puran Defrag, and many others (UltraDefrag being the best) display your disk... (most good UIs display the files in the block you're hovering your mouse over)
On Linux file systems, fragmentation is typically less then 5%, often 1 or 2% unless the disk is 99% full. In the event of a full disk, you can see significant fragmentation, but in that case the problem is a full disk.
So, bottom line, defragmentation is not a large enough problem on Linux to affect performance, so there are no significant defragmentation tools and you are sort of wasting your time worrying about it.
3) If you can't get a larger disk for any valid reason, then simply copy the whole lot (or by large chunks) to another disk, then copy it back. The advanced EXT4 FS writes it back contiguously eliminating fragmentation. This can be scheduled as a cron.daily job using Gnome Scheduler for the converts coming from Windows.
People seem to forget that a good modern defragger is not just defrager, but optimiser as well. Different areas of the hard disk platter read at different speeds. The closer to the centre of the disk, the slower the file read is. A modern defragger will analyse file usage and place frequently read files towards the outer edge of the platter and less frequently used files are moved towards the centre. Some even allow files that are flagged as archives to be pull as close to the centre as possible. I have seen large files on my Linux system broken into 1000's of segments.
Microsoft Drive Optimizer (formerly Disk Defragmenter) is a utility in Microsoft Windows designed to increase data access speed by rearranging files stored on a disk to occupy contiguous storage locations, a technique called defragmentation. Microsoft Drive Optimizer was first officially shipped with Windows XP.
Defragmenting a disk minimizes head travel, which reduces the time it takes to read files from and write files to the disk.[1] As a result of the decreased read and write times, Microsoft Drive Optimizer decreases system startup times for systems starting from magnetic storage devices such as a hard drive. However, defragmentation is not helpful on storage devices such as solid state drives, USB drives or SD cards that use flash memory to increase speeds, as these drives do not use a head. Doing so may decrease lifespan for these types of devices.
As early as the end of 1982, the IBM PC DOS operating system that shipped with early IBM Personal Computers included a Disk Volume Organization Optimizer to defragment the 5-inch floppy disks that those machines used. At this time, Microsoft's MS-DOS did not defragment hard disks. Several third party software developers marketed defragmenters to fill this gap. MS-DOS 6.0 introduced Microsoft Defrag.[2] Windows NT, however, did not offer a Defrag utility, and Symantec was suggested by others as a possible alternative for the utility.[3]
Initial releases of Windows NT lacked a defragmentation tool. Versions through Windows NT 3.51 did not have an application programming interface for moving data clusters on hard disks.[4] Executive Software, later renamed Diskeeper Corporation, released Diskeeper defragmentation software for Windows NT 3.51,[4] which shipped with a customized version of the NT kernel and file system drivers that could move clusters.
Microsoft included file system control (FSCTL) commands to move clusters in the Windows NT 4.0 kernel,[4] which worked for both NTFS and FAT partitions. However, Windows NT 4.0 did not provide a graphical or command-line user interface.[4]
Disk Defragmenter first shipped as part of Windows 95 and later shipped with Windows 98 and Windows Me, licensed from Symantec Corporation. It could be scheduled using a Maintenance Wizard and supported command line switches.[5] In the version of Disk Defragmenter included with Windows 95 and 98, if the contents of the drive changed during defragmentation, the program paused, rescanned the entire drive, and then resumed the process from where it had left off.[6] This quirk was removed in the Windows Me version of Disk Defragmenter.
Windows Disk Defragmenter was updated to alleviate some restrictions.[9] It no longer relies on the Windows NT Cache Manager, which prevented the defragmenter from moving pieces of a file that cross a 256KB boundary within the file. NTFS metadata files can also be defragmented. A command-line tool, defrag.exe, has been included,[10] providing access to the defragmenter from cmd.exe and Task Scheduler. In Windows XP, if the Master File Table (MFT) is spread into multiple fragments, defrag.exe and the GUI version can combine the MFT fragments during defragmentation.[11] Windows XP and later has introduced Boot Files Defragment function, this function is enabled by default and can be disabled in Registry.[12]
In Windows Vista, Disk Defragmenter includes an option to automatically run at scheduled times using Task Scheduler and uses low CPU priority and the newly introduced low priority I/O algorithm so that it can continue to defrag using reduced resources (less CPU and disk read/write activity) when the computer is in use. The user interface has been simplified, with the color graph, progress indicator, disk analysis and fragmentation information being removed entirely.
If the fragments of a file are over 64 MB in size, the file is not defragmented if using the GUI; Microsoft has stated that this is because there is no discernible performance benefit since the time seeking such large chunks of data is negligible compared to the time required to read them.[13] The result, however, is that Disk Defragmenter does not require a certain amount of free space in order to successfully defrag a volume, unlike performing a full defragmentation which requires at least 15% of free space on the volume. The command line utility, Defrag.exe, offers more control over the defragmentation process, such as performing a full defragmentation by consolidating all file fragments regardless of size.[14] This utility can be used to defragment specific volumes or to just analyze volumes as the defragmenter would in Windows XP.
 3a8082e126