Maintaining Your Hard Drive
The CPU and RAM are the most important factors for system performance, but your hard drive plays an important role in determining the overall speed of your computer. That's because the hard drive comes into play when you open programs or documents, when you save documents, or when you move and copy files. By moving less-used applications to your hard drive from RAM, the hard drive also comes into play when you're running low on RAM. So, keeping the hard drive running as near to peak performance as possible has a positive impact on system performance.
Recovering wasted hard drive space
At any time, some of the space on your hard drive is being eaten up by temporary files. As the name implies, temporary files are not like the programs you install or documents you save. Programs, apps, and documents are "forever," in the sense that Windows never deletes them at random. The only time a program is deleted, for example, is when you use Programs in the Control Panel to remove the program. Likewise, documents aren't deleted unless you intentionally delete them and also empty the Recycle Bin. And Windows 10 apps aren't deleted unless you remove them from the Windows 10 interface.
In contrast, the files in your Internet cache, also called your Temporary Internet Files folder, are temporary files. Every time you visit a web page, all the text and pictures that make up that page are stored in your Internet cache. When you use the Back or Forward button to revisit a page you've viewed recently, your browser pulls a copy of the page out of the Internet cache. That saves lots of time when compared to how long it would take to redownload a page each time you click the Back or Forward button to revisit a recently viewed page.
Before you click the Disk Cleanup tool, be forewarned that the process can take several minutes, and maybe longer. You never need to use Disk Cleanup to get rid of temporary files.
To recover some wasted disk space, click the Disk Cleanup button on the properties sheet for the hard drive. Open the This PC folder, right-click a drive, and choose Properties. In the Properties dialog box, click the Disk Cleanup button on the General tab. Disk Cleanup then analyzes the drive for expendable files. When the analysis is complete, you see the Disk Cleanup dialog box. The Files to Delete list shows categories of temporary files. When you click a category name, the Description below the names explains the types of files in that category. All the categories represent temporary files that you definitely can safely delete. Important programs or documents you saved on your own never appear in the list of temporary files.
The number to the right of each category name indicates how much drive space the files in that category are using and how much space you'll gain if you delete them. Choose which categories of files you want to delete by selecting (checking) their check boxes. If you don't want to delete a category of files, clear the check mark for that category. The amount of drive space you'll recover by deleting all the selected categories appears under the list. After you've selected the categories of files you want to delete, click OK. The files are deleted and the dialog box closes.
Deleting system restore files and unwanted features
If you click the Clean Up System Files button in Disk Cleanup, a More Options tab appears on the Disk Cleanup dialog box. Clicking that tab provides two more options for freeing up drive space:
- Programs and Features:
Takes you to the Programs and Features window, where you can uninstall programs and Windows Features you don't use.
- System Restore and Shadow Copies:
Deletes all restore points except the most recent one. This can be significant because system protection files are allowed to consume up to 15 percent of your available drive space.
Defragmenting and optimizing your hard drive
When a drive is newly formatted, most of the free space on the drive is available in a contiguous chunk. This means the disk clusters (the smallest amount of storage space that can be allocated) are side-byside in contiguous fashion. As Windows writes a file, it can do so in contiguous clusters, writing the entire file in one pass. When it reads the file back, it can also do so in one pass, making drive performance as good as possible.
However, the more a drive is used, the more fragmented the data becomes. Instead of writing data contiguously, Windows writes it here and there on the drive, splitting up the file into fragments (thus, the term fragmentation).
Data on solid-state hard drives isn't stored the same way it's stored on traditional hard drives. Because of this difference, fragmentation of data does not exist on solid-state drives, so defragmenting them is not necessary.
When that happens, the drive heads move around quite a bit to read and write files. You may even be able to hear the drive chattering when files get seriously fragmented across the drive. This movement puts extra stress on the mechanics of the drive and also slows it down a bit.
To get your drive running more smoothly, you can defragment (or defrag for short) the drive. When you do, Windows takes most of the files that are split up into little chunks and brings the pieces together to make each file contiguous again. It also moves most files to the beginning of the drive, where they're easiest to get to. The result is a drive that's no longer fragmented, doesn't chatter as much, and runs faster.
You don't need to defragment your drive too frequently; four or five times a year is probably sufficient. The process can take a few minutes or up to several hours, so consider running it overnight. However, note that Windows 10 automatically defragments the drive. You can view the current schedule, if any, in the Disk Defragmenter program.
You don't have to stop using the computer while Windows defragments the drive. You can continue to use it as you normally would. Doing so, however, continues to generate read/write operations on the drive, which ultimately slows the defragmentation process. For that reason, you should run the defragmentation operation while you are not using the computer. See Step 5 in the following list to choose the best time to run optimization.
To defragment a hard drive, follow these steps, starting at the desktop:
- Open the This PC folder in File Explorer.
- Right-click the icon for your hard drive (C:), and choose Properties.
- In the Properties dialog box that opens, select the Tools tab.
- Click the Optimize button. The Optimize Drives program opens.
When you see a message that says you don't need to defragment, that doesn't mean that you can't or shouldn't. It just means the drive isn't badly fragmented. But you can still defragment it.
- In the Optimize Drives dialog box, you can set up a schedule to run the optimizer. Click Change Settings to establish that schedule. You also can click the Analyze button to get the current status of the drive and to see if an optimization process (defragmentation) would be beneficial. The program starts analyzing your drive and may take as little as a few minutes or as much as a few hours.
- When the defragmentation is complete, the Current Status column shows an OK (0% Fragmented) message for the drive you optimized.
When you optimize the drive, the Disk Defragmenter tool defragments all the fragmented files and moves some frequently used files to the beginning of the drive, where they can be accessed in the least time with the least effort. Some files aren't moved. That's normal. If Windows decides to leave them where they are, it has a good reason.
You may hear lots of drive chatter as Disk Defragmenter is working. That's because the drive heads are moving files around to get them into a better position for defragmentation.
When Disk Defragmenter is finished, close any open dialog boxes and the Disk Defragmenter program window.