Can Swap Files Cause Blue Screens Of Death?
Hi Fred, I've been a heavy tinkerer with my computers for many years, so I've learned to deal with almost all computer problems. The past few days, though, I'd gotten several "page fault in non-paged area" BSOD on my WinXP installation. Now, knowing that my machine is six years old, under heavy use, and soon to be replaced, my first thought was that I had faulty RAM. Just on a hunch though, I deleted and recreated my semi-permanent swap file, and since then <knock on wood> haven't seen a BSOD.
Have you heard of a case where a corrupt swap file was the cause of this sort of error? In any case, it might be something for your other readers to keep in mind if they start seeing the same errors.
I enjoy the newsletter, and wish you continued success. ---Jim Pendergrass
Given that the problem went away after you recreated
your swap file--- or, as Microsoft now calls it in XP, page file or paging
file--- it could well be that the paging file was somehow involved in your "Blue
Screens of Death" though not necessarily the root cause. The specific error
message you received, also affectionately known as a "Stop 0x50" message, is
generated when system software requests data from memory--- either physical or
virtual--- but the data isn't there in a readable form. This can be caused by a
wide range of problems, including malware, buggy anti-virus software or RAM
issues and other hardware problems.
A semi-permanent swap or paging file is really a combination of what used to be
called permanent and dynamic swap files. It's very possible that the permanent
part of the new semi-permanent paging file took up residence on another part of
the disk when you recreated it, and vacated problematic disk sectors--- that may
be why the problem went away.
In general, whenever you suspect swap or paging file-related problems--- and
even if you don't--- it's good system hygiene to "clean under your paging file."
Doing this also increases the likelihood that any paging file problems are not
hard disk related. The process involves four steps: 1) delete your paging file;
2) run Scandisk with the /f and /r parameters to fix errors and "block" bad
sectors on the disk; 3) run Disk Defragmenter; and 4) re-create your paging file
on error-free sectors of an unfragmented disk. Here are the steps in detail:
1) Delete your paging file - Right-click on My Computer and choose Properties.
Select the Advanced tab, then click on the Settings button in the Performance
box. Click on the Advanced tab, then the Change button. Select the No paging
file radio button, click Set, then OK. Click on the next OK button, then reboot.
2) Run Scandisk with the /f and /r parameters - Click, Start, choose Run, then
type cmd in the text box and click OK to open a command line window. Type "chkdsk
/f /r" without quotation marks and press the Enter key. Press Y and the Enter
key to make Scandisk run next time you reboot. Now Reboot. This will take a
while; if you have a large disk or partition to scan, you might want to start
the task as bedtime, and let the PC work overnight.
3) Run Defrag - Choose Start/All Programs/Accessories/System Tools/Disk
Defragmenter. Choose the hard disk that your paging file will live on (usually
C:) and click Defragment. When defragmentation is complete, reboot.
4) Re-create your paging file - Right-click on My Computer and choose
Properties. Select the Advanced tab, then click on the Settings button in the
Performance box. Click on the Advanced tab, then the Change button. Select in
megabytes Initial and Maximum sizes. (Note that "Initial size" is equal to the
size of the permanent part of your semi-permanent paging file, and the
difference between the two sizes is the maximum size of the temporary part. Make
them the same number for a fully permanent paging file if you want to sacrifice
a little disk space for a little performance boost.) Click Set, then on the OK
buttons to exit, then reboot.
One last optimization note: After all this, check to see if your paging file is
fragmented. Launch Disk Defragmenter and click Analyze. In a few seconds a
dialog box will pop up. Click View Report. In the Volume Information window,
find Total Fragments under the Pagefile fragmentation section. If the number is
higher than one, you've got a fragmented paging file. To fix this, you need to
create space on your disk--- ideally at least 25% of the disk capacity should be
free. You can do this by temporarily moving files to another drive. Follow steps
1, 3 and 4 above to delete your paging file, defrag the disk again, then
re-create the paging file. With enough space, Windows will create it all in one
contiguous area of the disk for maximum performance.
