Page Files and Fragmentation
Anytime you're
dealing with writing files to and from a hard drive, fragmentation
is going to be an issue. After many years of writers pounding away
at how performance suffers when a hard drive isn't defragmented,
more and more users are making it a part of their regular computer
maintenance. Briefly, fragmentation occurs when a file is written to
a drive and there isn't sufficient contiguous space on the drive to
hold each part of the file in order. When a drive is relatively
empty, fragmented files are less likely to occur since there are
numerous large blocks of space available. As the drive fills up and
files are also deleted, different sized pockets of empty space occur
making it more difficult to find larger areas of contiguous space.
Defragmenting the drive gathers the pieces of files that weren't
able able to be written contiguously and reorders them on the drive.
The performance gain is achieved by the hard drive heads not having
to move to many different locations on the hard drive platters to
gather the pieces of a file when it's accessed.
Paging
files are normally created when a drive is relatively empty and
finding a large contiguous block of space is not a problem. Refer
back to the screen capture above and you'll see that the initial
size of the page file is 1152MB. The question becomes, since a page
file is created all at once in a contiguous block, why would it ever
become fragmented? The answer is because a page file is dynamic. By
default, Windows XP creates a pagefile that can be expanded and
contracted depending on the amount of extra virtual memory that's
needed. If the initial block of drive space that was allocated at
setup becomes surrounded by additional files that have been saved to
the drive, a fragmented page file can occur when the operating
system expands it past the initial size. This is the very reason why
having a dedicated drive for the paging file is such an attractive
option. It eliminates fragmented page files. Unfortunately, having a
dedicated drive is not a common option. To check whether or not the
page file is fragmented:
Click
[Start] then [Run] and enter compmgmt.msc in the [Open:] line to
open Computer Management Console
In the left pane, click [Disk Defragmenter] under the [Storage]
section.
In the right pane, click the drive that contains the page file and
click [Analyze]
In a
few minutes you'll be presented with a dialog box where you can
click on [View Report]. Scroll down until you come to the pagefile
section. It will tell you the size of the pagefile and the
fragmentation status. Great. Just click on defragment and the drive
and page file will be defragmented, right? Wrong. The next article
in the series talks about defragmentig the page file.
Page File Articles Series
[
Paging File ] [Locating the
Page File ] [
Sizing the Page File ] [
Physically Setting Page File Size ]
[
Page Files and Fragmentation ] [
Defragmenting the Page File ]
[
Paging File Performance Monitoring ]
|