MCTS 70-680: Disk Defragmenter in Windows 7

Uploaded by itfreetraining on 22.01.2012

Welcome back to your free training course for the Windows 7 70-680 exam. In this video
I will look at how to defrag your disks in Windows 7.
When you write data to your hard disks hopefully there will be enough free space on your hard
drive that Windows can put your file in the one place. As shown here, what tends to happen
over time is that files are split up all over the hard disk as files are added, removed
or modified. When Windows reads these files the hard disk must perform numerous seeks
to read the file. Hard disks seeks are a lot slower when compared to reads from the hard
disk. If your system has to do a lot of seeks to access a file the performance of the system
will start to suffer. To improve system performance, Windows includes
a tool called disk defragmenter. Disk defragmenter will take all the files on your hard disk
and rearrange them so that they are in the one place. This means that when you read a
file on the hard disk the hard disk only does one seek to access the file. I will now change
to my Windows 7 computer to demonstrate how to use the disk defragmenter in Windows 7.
To access the disk defragmenter, open Windows explorer and then right click a hard drive
and select properties. From here select the tools tab. From the tools tab select the option
defragment now. The disk defragmenter does take some time
to complete. Before you start this process it is a good idea to see how fragmented your
hard disk is. To do this, select the hard disk and selected the option at the bottom
analyses disk. The analysis disk function takes a few minutes to complete so I will
pause the video and restart it when it is complete.
Once the disk defragger has completed you will get a statistic how fragmented the hard
disk is. Microsoft recommended that the hard disk be defragged when this statistics reaches
10 percent. This hard disk drive is 19 percentage fragmented. Disk fragmentation is therefore
recommended. Defragging the hard disk can take hours to
complete. If the hard disk is only a little fragmented it is not worth the time waiting
for it to complete. The speed gain versus the time you wait for the disk defragmenter
to complete is hardly worth it. To start defragging the hard disk, select
the button at the bottom defragment disk. The process does take a long time to complete
and you may notice some performance reduction during this time. The gui interface for the
disk defragmenter is quiet simple and does not give you many options. In previous versions
of Windows you may remember a graphical version of the disk fragment. These versions of disk
defragmenter would show you a pictorial version of all blocks on the hard disk and which ones
needed to be moved. Windows no longer supports this, if you want software like this you will
need to purchase a 3rd party disk defragment. Since defragging does take a long time to
complete and slows the performance of the computer down I would prefer to run it at
night time. In this case I will stop the defragger and select the option configure schedule to
configure disk defragmenter to work outside hours.
By default disk defragmenter will run weekly at 1am on Wednesday morning. This is done
by Microsoft so the average user’s hard disk will be defragged at regular intervals
without them having to do anything. You can access some additional options for
disk defragging when you run it from the command line. I will now close disk defragmenter and
open a command prompt making sure I right click it and select run as administrator.
If you want to first determine if the hard drive needs to be defragged, run the command
defrag, drive letter with the switch /a. This will analysis the drive and gives
you an percentage of how fragmented the hard disk is. Remember Microsoft recommends that
you defrag the drive after this value gets above 10 percent. The analysis does take a
few minutes to complete so I will pause the video and return shortly.
The analysis is complete and reporting the drive is 19 percent fragmented, the same value
the gui version gave me. One reason that you may want to defrag the drive is if you wanted
to shrink the partition. In order for the shrink operating to work correctly all the
free space for the hard disk needs to be at the end.
To ensure that all the free space is put at the end of the volume you can run defrag with
the /x switch. This switch will consolidate all the free space putting it at the end of
the drive. This process does take a long time to complete so I will pause the video and
return when it is complete. The consolation job is complete. The process
did take several hours to complete. Notice that after consolidating the space the drive
is still 19 percent fragmented. In some cases using the consolidating option is faster than
running full drive defragmentation. It can be faster to consulate space if there are
only a couple of files at the end of the hard disk stopping you from shrinking the hard
disk. In this case the process took hours so performing a full defrag instead would
not have made much of a difference in the time the job took to complete.
In the last few examples I have specified the hard drive that I wanted to work with.
If you want to perform the action on all drives in the system you can add the /c parameter.
The c parameter will perform the action on all drives in the system.
Defrag does gives you some information while it is working but if you want additional information
you can add the /v switch for verbose to the more information while it is working.
This will not give you the progress of the defrag job one of the most noticeable missing
features in the gui. To get an idea how long defrag will take you can add the u switch.
This will give you the progress of each step as it is done.
If I run these 3 switches at once, the c, v and u switches, this will perform a full defrag
on the system on all drives giving us additional information and a progress meter. The process
will once again take hours to complete so I will pause the video and return when it
is completed. Now that disk defragment has completed, notice
at the top the total fragmented space is 0 percentage and fragments per file is 1. This
means the hard disks currently has not fragmentation on it. In some cases these statistics may
not be zero and 1. This is because certain files cannot be defragged. For example system
files, encrypted files and files that you have open. This is why before you start defragging
you hard disk you should close any open program to ensure Windows does not have any open files.
This concludes disk defragmentation. In the next video I will look at some of the other
disk tools that Windows 7 has to offer and also removable device policy. For more free
videos please check out are web page and you tube channel. Thanks for watching.