Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Vista

Maintaining Your Windows Vista System : Defragmenting Your Hard Disk

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/12/2011 4:09:00 PM
Windows Vista comes with a utility called Disk Defragmenter that’s an essential tool for tuning your hard disk. Disk Defragmenter’s job is to rid your hard disk of file fragmentation.

File fragmentation is one of those terms that sounds scarier than it actually is. It simply means that a file is stored on your hard disk in scattered, noncontiguous bits. This is a performance drag because it means that when Windows Vista tries to open such a file, it must make several stops to collect the various pieces. If a lot of files are fragmented, it can slow even the fastest hard disk to a crawl.

Why doesn’t Windows Vista just store files contiguously? Recall that Windows Vista stores files on disk in clusters, and that these clusters have a fixed size, depending on the disk’s capacity. Recall too that Windows Vista uses a file directory to keep track of each file’s whereabouts. When you delete a file, Windows Vista doesn’t actually clean out the clusters associated with the file. Instead, it just marks the deleted file’s clusters as unused.

To see how fragmentation occurs, let’s look at an example. Suppose that three files —FIRST.TXT, SECOND.TXT, and THIRD.TXT—are stored on a disk and that they use up four, three, and five clusters, respectively. 

Figure 1. Three files before fragmentation.

If you now delete SECOND.TXT, clusters 5, 6, and 7 become available. But suppose that the next file you save—call it FOURTH.TXT—takes up five clusters. What happens? Well, Windows Vista looks for the first available clusters. It finds that 5, 6, and 7 are free, so it uses them for the first three clusters of FOURTH.TXT. Windows continues and finds that clusters 13 and 14 are free, so it uses them for the final two clusters of FOURTH.TXT. Figure 2 shows how things look now.

Figure 2. A fragmented file.

As you can see, FOURTH.TXT is stored noncontiguously—in other words, it’s fragmented. Although a file fragmented in two pieces isn’t that bad, it’s possible for large files to split into dozens of blocks.

Running the Disk Defragmenter Tool

The good news with Windows Vista is that it configures Disk Defragmenter to run automatically—the default schedule is weekly: every Sunday at 4:00 a.m. This means that you should never need to defragment your system manually. However, you might want to run a defragment before loading a particularly large software program.

Before using Disk Defragmenter, you should perform a couple of housekeeping chores:

  • Delete any files from your hard disk that you don’t need, as described in the previous section. Defragmenting junk files only slows down the whole process.

  • Check for file system errors by running Check Disk.

Follow these steps to use Disk Defragmenter:

1.
Select Start, All Programs, Accessories, System Tools, Disk Defragmenter. Alternatively, in Windows Explorer, right-click the drive you want to defragment, click Properties, and then display the Tools tab in the dialog box that appears. Click the Defragment Now button. Either way, the Disk Defragmenter window appears, as shown in Figure 3.

Figure 3. Use Disk Defragmenter to eliminate file fragmentation and improve hard disk performance.

2.
Click Defragment Now. Windows Vista defragments your hard drives.

3.
When the defragment is complete, click Close.

Tip

In some cases, you can defragment a drive even further by running Disk Defragmenter on the drive twice in a row. (That is, run the defragment, and when it’s done immediately run a second defragment.)


Changing the Disk Defragmenter Schedule

If you want to run Disk Defragmenter on a different day, at a different time, more often or less often, follow these steps to change the default schedule:

1.
Select Start, All Programs, Accessories, System Tools, Disk Defragmenter.

2.
Make sure that the Run On a Schedule check box is activated.

3.
Click Modify Schedule to display the Disk Defragmenter: Modify Schedule dialog box.

4.
Use the How Often list to select the defragment frequency: Daily, Weekly, or Monthly.

5.
For a Weekly schedule, use the What Day list to select the day of the week on which to run the defragment; for a Monthly schedule, use the What Day list to select the day of the month on which to run the defragment.

6.
Use the What Time list to select the time of day to run the defragment.

7.
Click OK to return to the Disk Defragmenter window.

8.
Click Close.

Defragmenting from the Command Line

If you want to schedule a defragment or perform this chore from a batch file, you have to use the DEFRAG command-line utility. (You need an Administrator command line to run DEFRAG. Select Start, All Programs, Accessories, right-click Command Prompt, and then click Run as Administrator.) Here’s the syntax:

DEFRAG 
volume
[-c] [-a] [-f] [-v]

  
volumeSpecifies the drive letter (followed by a colon) of the disk you want to defragment.
-cTells DEFRAG to defragment all the system’s drives.
-aTells DEFRAG only to analyze the disk.
-fForces DEFRAG to defragment the disk, even if it doesn’t need defragmenting or if the disk has less than 15% free space. (DEFRAG normally requires at least that much free space because it needs an area in which to sort the files.)
-vRuns DEFRAG in verbose mode, which displays both the analysis report and the defragmentation report.
Other -----------------
- Maintaining Your Windows Vista System : Deleting Unnecessary Files
- Maintaining Your Windows Vista System : Checking Free Disk Space
- Maintaining Your Windows Vista System : Checking Your Hard Disk for Errors
- Maintaining Your Windows Vista System : Vista’s Stability Improvements
- Working with Windows Communication Features (part 5) - Using Windows Meeting Space
- Working with Windows Communication Features (part 4) - Using Windows Calendar
- Working with Windows Communication Features (part 3) - Using Windows Mail to Access Newsgroups
- Working with Windows Communication Features (part 2) - Working with Windows Mail
- Working with Windows Communication Features (part 1) - Configuring Windows Mail for E-Mail
- Mobile Computing in Windows Vista : Getting the Most Out of Your Tablet PC
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server