G
Guest
One of my laptops has been displaying the annoying characteristic of random
hangs at startup. Depending upon when the logon sequence is commenced it will
proceed, apparently normally, showing all of the desktop icons and tray bar
and then suddenly freeze up without any warnings. A power off / reboot then
usually proceeds without incident. This has been occurring on about 1 out of
every 3 bootups.
There is still a directory lookup / file access race condition lurking
somewhere within the Windows XP kernel. This shows up occasionally when one
clicks up a WORDPRO document on a busy system only to have Windows report
that the file does not exist. Click again and it magically reappears. This
could be either a result of a low-level file access routine returning a bogus
nonexistent error code under unusually heavy load conditions or of collisions
between intermediate directory lookup routines mishandling a timeout code
when the file system is busy. Either way, if this occurs during boot, then
critical files may appear to be missing causing the boot sequence to fail.
On the assumption that this is the case I was looking for ways to improve
system responsiveness at boot time when there are a lot of applications
starting up and putting a heavy load on the pagefile (which may be related to
the file access race described above). Defragmenting the pagefile is one way
to improve disk access efficiency during the potentially high disk access
bottleneck time experienced during boot. A normal defragment does not affect
this file since it is in the "Unmovable" class.
Since this strategy appears to have corrected my random startup hang problem
(the 'random' aspect had become repeatable enough to enable me to determine
if something is having a positive effect), I share it as a relatively simple
preliminary troubleshooting technique for problems that would otherwise be
very difficult to diagnose. Usually this type of problem requires more
severely invasive / time-consuming procedures such as the reinstallation of
Windows and all of the applications that have been loaded onto your system.
(Note: A reformat/reinstallation inherently defragments the pagefile which
may be why this often recommended but onerous procedure often works.) This
hasn't corrected the underlying flaw in the kernel but may make it less
likely to occur at a critical time.
I used Perfect Disk 7.0 from raxco.com to do an offline defragment of the
pagefile (100% defragmentation) but the following procedure can be used to
reduce the fragmentation of the pagefile (depending upon the amount of
contiguous free space available) without third party software:
o first defragment the entire boot disk: Control Panel /
Administrative Tools / Computer Management / Storage /
Disk Degragmenter / Defragment
o disable the pagefile: Control Panel / System / Advanced /
Performance (Settings) / Advanced / Virtual memory (Change)
o note the previous settings for pagefile size options so that
they may be restored
o No Paging file / Set / OK
o shut down the system
o reboot into SAFE mode (F8 on the startup screen, select SAFE mode
from the displayed options)
o reenable the pagefile: Control Panel / System / Advanced /
Performance (Settings) / Advanced / Virtual memory (Change) /
enter the settings noted previously / OK
o shut down the system
o reboot normally
NB: Attempting to boot Windows XP normally (ie. not in SAFE mode) without a
pagefile can cause all manner of strange failures -- something that supports
the theory that there is something fundamentally wrong with the ability of
disk access routines to handle an overloaded file system at boot time.
hangs at startup. Depending upon when the logon sequence is commenced it will
proceed, apparently normally, showing all of the desktop icons and tray bar
and then suddenly freeze up without any warnings. A power off / reboot then
usually proceeds without incident. This has been occurring on about 1 out of
every 3 bootups.
There is still a directory lookup / file access race condition lurking
somewhere within the Windows XP kernel. This shows up occasionally when one
clicks up a WORDPRO document on a busy system only to have Windows report
that the file does not exist. Click again and it magically reappears. This
could be either a result of a low-level file access routine returning a bogus
nonexistent error code under unusually heavy load conditions or of collisions
between intermediate directory lookup routines mishandling a timeout code
when the file system is busy. Either way, if this occurs during boot, then
critical files may appear to be missing causing the boot sequence to fail.
On the assumption that this is the case I was looking for ways to improve
system responsiveness at boot time when there are a lot of applications
starting up and putting a heavy load on the pagefile (which may be related to
the file access race described above). Defragmenting the pagefile is one way
to improve disk access efficiency during the potentially high disk access
bottleneck time experienced during boot. A normal defragment does not affect
this file since it is in the "Unmovable" class.
Since this strategy appears to have corrected my random startup hang problem
(the 'random' aspect had become repeatable enough to enable me to determine
if something is having a positive effect), I share it as a relatively simple
preliminary troubleshooting technique for problems that would otherwise be
very difficult to diagnose. Usually this type of problem requires more
severely invasive / time-consuming procedures such as the reinstallation of
Windows and all of the applications that have been loaded onto your system.
(Note: A reformat/reinstallation inherently defragments the pagefile which
may be why this often recommended but onerous procedure often works.) This
hasn't corrected the underlying flaw in the kernel but may make it less
likely to occur at a critical time.
I used Perfect Disk 7.0 from raxco.com to do an offline defragment of the
pagefile (100% defragmentation) but the following procedure can be used to
reduce the fragmentation of the pagefile (depending upon the amount of
contiguous free space available) without third party software:
o first defragment the entire boot disk: Control Panel /
Administrative Tools / Computer Management / Storage /
Disk Degragmenter / Defragment
o disable the pagefile: Control Panel / System / Advanced /
Performance (Settings) / Advanced / Virtual memory (Change)
o note the previous settings for pagefile size options so that
they may be restored
o No Paging file / Set / OK
o shut down the system
o reboot into SAFE mode (F8 on the startup screen, select SAFE mode
from the displayed options)
o reenable the pagefile: Control Panel / System / Advanced /
Performance (Settings) / Advanced / Virtual memory (Change) /
enter the settings noted previously / OK
o shut down the system
o reboot normally
NB: Attempting to boot Windows XP normally (ie. not in SAFE mode) without a
pagefile can cause all manner of strange failures -- something that supports
the theory that there is something fundamentally wrong with the ability of
disk access routines to handle an overloaded file system at boot time.