Optimize your Android with
free Avast Cleanup
If your computer has been running slowly, or if you’ve been doing constant computing without giving your machine a chance for maintenance, it may become fragmented. Luckily, there’s an easy process to defragment your hard disk and boost your PC’s performance. Learn how to defrag your disk using
Windows 10, Windows 8, and Windows 7.
This article contains:
Defragging your hard disk on Windows 10 and Windows 8 is straightforward:
Click on the Start button in the bottom left corner of your screen. Type the word defrag.
From the options suggested, click on Defragment and Optimize drives.
Click on Optimize. This analyzes the disk’s fragmentation level and launches the defragmentation process. That can take a few hours to finish. While it’s in process, make sure not to do much work on your PC, aside from maybe some light browsing.
Once done, it will show you the OK status seen above.
Here’s how to defrag your disk drive when running Windows 7:
Click on the Start orb in the bottom left corner and type in defrag.
Select Disk Defragmenter from the search results.
Click on Defragment disk to launch the defragmentation process.
If you have a lot of files on your system or if your system hasn’t been defragged in quite a while, this could take up to a few hours. Just let it run and don’t interfere with it. Leave your PC alone!
Some third-party utilities can make your life easier: One such tool is our own Avast Cleanup, which includes its own defrag program. Best of all: it runs fully automatically on a regular basis (or manually, you decide!). Check it out:
“Defrag your disk” sounds like advice from ancient times, a recommendation you’d get back when it was common to run Windows 98 on an old Pentium II computer. “Defrag!” was regular advice when the system slowed down to a crawl. However, even though people don’t talk about it anymore, defragmentation is still necessary for ideal performance.
But how exactly does defragging help?
Let’s take a look at the anatomy of a traditional hard disk, in order to understand why fragmentation affects your PCs performance. A hard drive is made out of mechanical components: multiple discs are stacked on top of each other and rotated through a spindle. These discs, also called platters, contain the data. To retrieve the data, the computer accesses the discs using the read/write heads (similar to your grandparents’ vinyl record player).
Hard disk access is a highly mechanical process, even though the other computer components are purely digital. Disk access is also the slowest part of computing; access times to the bits and bytes on a traditional hard disk drive (HDD) is typically in the 5-15 millisecond range, whereas accessing data on a modern solid state disk (SSD) or in RAM is done in a fraction of a millisecond.
Aside from the raw speed to access files, the overall throughput of hard disks is also low. Typical HDD speeds are 100 MB/sec for larger files and 0.5-1 MB for small file fragments (which are more common in day-to-day operations). To learn more about the differences, check out our SSD vs. HDD comparison.
But the key takeaway is that old-school HDDs are extremely slow. So slow, in fact, that the rest of your system has to wait “ages” (in computer terms) for the hard disk to read data. It’s especially noticeable when you start Windows, launch programs, or open big files. That’s why things can feel very slow on PCs with a hard disk (which are still fairly common).
In theory, any file on your hard disk would be stored in a continuous manner on the platter. Perhaps it starts out that way, when your system is brand new. However, you move, delete and copy files regularly. You uninstall programs. A file grows as you add more data, and no longer fits in the original space allocation. The end result is gaps, empty spaces on your hard disk.
For a simple example, imagine that you go on an organization spree, and you clean up 5 GB from your hard disk. That leaves a gap of 5 GB in the middle of space otherwise occupied by Windows, your applications, and data files. The next day, you download the next hot Far Cry game, which is roughly 20 GB in size. Your hard disk stores the first 5 GB of the game in that gap and puts the remaining 15 GB fragments (aha!) at the end of the occupied disk space. That means the new file is split up, or fragmented, into two pieces. The aforementioned read/write head of your hard disk now has to piece together Far Cry when it launches. That takes more time as it’s no longer kept in one continuous block of information.
This is an oversimplified example. In reality, your computer winds up with hundreds of free spaces. The operating system splits up data and programs into so many pieces it makes your head spin.
On a freshly formatted and clean-installed Windows PC, the fragmentation level is near zero, but over time it can grow alarmingly high.
Old timers might remember the DOS or Windows 95 views which showed the gaps on your hard disks and how it was being put together. The old DOS and early Windows utilities may be no more, but the concept is the same.
Defragmentation puts these pieces back together again. The result is that files are stored in a continuous manner, which makes it faster for the computer to read the disk, increasing the performance of your PC.
Most recent Windows versions such as Windows 7 and Windows 10 defrag the disk automatically on a regular basis. However, if you’re constantly busy doing something on your machine, Windows never gets around to this background task. As a result, you should sometimes run it yourself (see the steps above) and check on the fragmentation status. On one of my computer systems, the automatic defragmentation process hadn’t been run for 12 days and was 25% fragmented. That had a negative effect on performance, so defragging helped a lot (as do our other tips to improve your computer's performance).
Defragging is absolutely safe for a traditional HDD. Not sure if you have SSD or HDD? When you launch defrag, Windows will tell you whether it’s looking at a hard disk or SSD.
If you have an SSD, then there is no need to defrag the disk. The Optimize button on the defrag screen performs a TRIM operation. You don’t need to worry about the mechanics, but if you’re curious: TRIM tells the SSD which data blocks are no longer needed and can be reused (i.e. after you’ve deleted a file). The next time an application writes to storage, it doesn’t need to erase a data block first. The end result is that SSDs improve performance and reduce wear and tear.
That should answer all your defrag needs! But in reality it’s all just one piece of the puzzle for good Windows computing performance. Aside from the articles we’ve mentioned about cleaning up and speeding up your PC, you might want to look at Avast Cleanup, which helps reduce the load on your PC. Clear out gigabytes of unnecessary files, remove bloatware, and get automatic maintenance to keep things running smoothly.