Defragmenting a Hard Drive

by Barry Dysert
(last updated November 10, 2014)

Bob started to notice that, as of late, his system has gotten a bit sluggish. He mentioned it to a friend, and she said that he should check into defragmenting his hard drive. While she explained a little bit about what this means, they ran out of time before she could tell him how to actually defragment. Bob is wondering how to go about defragmenting his hard drive.

Defragmenting a disk can be an effective way to improve your system's performance—at least for mechanical drives. Windows does not defragment solid-state drives, as doing so can accelerate them wearing out.

Through the normal course of use, the performance of mechanical disks can degrade from having lots of contiguous space to having that space split into pieces that the operating system must keep track of every time it needs to access a file. Defragmenting a disk essentially groups files and pieces of files into contiguous space again so that disk access is improved.

By default, automatic disk defragmentation is turned on in Windows so that you usually don't have to concern yourself with it. It is possible in Bob's case that automatic defragmentation is turned off, or he wouldn't have noticed a progressive sluggishness to his system. If you wish to change the defragmentation schedule, want to perform a manual defragmentation, or otherwise are just curious about the condition of your disks, you can launch the defragmenter and investigate.

There are several different ways you can start the disk defragmenter tool that is provided with Windows; all of them lead to the same point. Here are the methods to start the defragmenter in Windows 7:

  • Click Start | Computer and then right-click on the drive you want to defragment. In the resulting Context menu, click Properties to display the drive's Properties dialog box. Display the Tools tab and click Defragment Now.
  • Click Start | All Programs | Accessories | System Tools | Disk Defragmenter.
  • Click Start | Control Panel | System and Security. Under the Administrative Tools category, click Defragment Your Hard Drive.

If you are using Windows 8, start the Control Panel (use any of the common ways of doing this), then click System and Security. Scroll down, and under the Administrative Tools category you'll see a link to Defragment and Optimize Your Drives.

Once the defragmenter is running, you'll see its window. The appearance of the window differs a bit depending on your version of Windows. Here's how the window looks in Windows 7: (See Figure 1.)

Figure 1. The Disk Defragmenter window.

If you are using Windows 8, the Optimize Drives window looks like this: (See Figure 2.)

Figure 2. The Optimize Drives window.

The information displayed in the Disk Defragmenter or Optimize Drives window on your system will necessarily be different than what you see in these examples. You can tell a few things from this information:

  • When automatic defragmentation is set up to run. (In the Windows 7 example it is set to run every Wednesday at 1:00 a.m. In the Windows 8 example it is set to run weekly, but a day and time is not indicated.)
  • When defragmentation will next run. (Only in Windows 7.)
  • What the current fragmentation status is of your disk drives.

If you want to change the defragment schedule, click the Configure Schedule button in Windows 7 or the Change Settings button in Windows 8. Windows 7 displays the Modify Schedule dialog box. (See Figure 3.)

Figure 3. The Disk Defragmenter scheduling window.

In Windows 8 you'll see a very similar dialog box, the only difference being that you cannot specify a day and time for the schedule. The dialog boxes allow you to turn off automatic defragmentation (which is not recommended), change how often the defragmenter runs, when it runs (again, only in Windows 7), and what disks it runs on. If you change any of the settings, click OK to return to the previous window.

In the Disk Defragmenter or Optimize Drives dialog box you can analyze the current state of each of your disk drives by selecting the disk to be analyzed and clicking the Analyze Disk button (Windows 7) or the Analyze button (Windows 8). When you do, the information in the dialog box is updated to show that an analysis is underway. After a few minutes, the analysis completes and you may see a change in the "% fragmented" value for that disk. Assuming you're doing defragmentation regularly, the change probably won't be big, but you nevertheless have the opportunity to manually do a defragmentation pass on it immediately. This is done by clicking the Defragment Disk button (Windows 7) or the Optimize button (Windows 8).

Manually performing a defragmentation causes a re-analysis of the disk, and then the actual defragmentation process begins. You are continually updated on the progress of the process, and after a while (depending upon how much work there was to do) the process will end, and your disk will once again be defragmented.

Incidentally, if at any time (whether you're doing an analysis or an actual defragmentation) you want to stop the process, you can safely click the Stop Operation button without fear of data corruption.

 This tip (12144) applies to Windows 7 and 8.

Author Bio

Barry Dysert

Barry has been a computer professional for over 30 years, working in different positions such as technical team leader, project manager, and software developer.  He is currently a senior software engineer with an emphasis on developing custom applications under Microsoft Windows. ...

MORE FROM BARRY

Hiding Folders Under This PC

File Explorer is a virtual necessity when it comes to navigating the file system. If you find it a little too verbose, ...

Discover More

Renaming or Deleting File Folders

Just as you can rename and delete individual files, so to can you rename and delete the folders that contain those files.

Discover More

Breaking a Network Drive Mapping Association

Windows makes it easy to break the association between a network drive and its assigned letter. This tip explains how.

Discover More
More WindowsTips

Creating a System Image

A system image is a snapshot of your system disk as of a certain point in time. Should the need arise, you can restore your ...

Discover More

Deleting a Saved Search

Windows Explorer has a good search utility built into it. As you use it, you may wish to delete a previously saved search ...

Discover More

Moving Files or Folders

A common operation within Windows is to move files and folders from one location to another. Here are the two major ways that ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three minus 2?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.