Microsoft Windows XP was designed to optimize the boot process so that users can boot their machines and access the operating system as quickly as possible. For the most part, XP is successful. There is, however, almost always room for improvement, and BootVis.exe, a free Microsoft utility, can help you get the best boot performance possible from an XP system.
Editor’s note: BootVis.exe is no longer supported or available from Microsoft. However, you can download the application from the TechRepublic Downloads Library along with a PDF version of this blog post.
How the Windows XP boot process works
A main cause of slow boots with Windows NT/2000 was their method for loading drivers. Prior to XP, Windows versions loaded drivers sequentially. Windows XP, however, loads drivers concurrently. It also records which applications are launched during startup. This information is written to the C:\WINDOWS\Prefetch\Layout.ini file.
When the Layout.ini file is created, XP performs a partial defragmentation on the files listed in Layout.ini. This defrag process attempts to make the files listed in Layout.ini available in one contiguous area on the hard disk, allowing these files to be accessed, and the associated drivers to be loaded, more quickly. This process is run in the background approximately every three days.
There are four factors affecting the defrag process:
- The system must be idle for XP to perform the defragmentation.
- There must be enough free, contiguous disk space to contain all the files listed in the Layout.ini file.
- The partial defrag performed by XP will not create the necessary contiguous disk space. That can be accomplished only by running a full defragmentation with the XP defragmentation tool or a third-party disk utility.
- The XP defrag process will not use a third-party utility to perform the defragmentation. Any external tools must be run on their own.
BootVis, which Microsoft describes as a “performance trace visualization tool,” actually performs the same tasks as the XP boot process, except that BootVis allows the information obtained during a single boot to be used for optimization, rather than monitoring the system over a period of several days.
Download the file and then extract the BootVis.exe utility by double-clicking the archive file, selecting a location for the Bootvis.exe file, and clicking OK.
Opening BootVis and running a trace
To run BootVis, simply double-click the BootVis.exe file and the BootVis screen, shown in Figure A, should appear.
Here is the BootVis main window.
The first step in tweaking or troubleshooting your boot process is to run a boot trace. Click File | New | Next Boot + Drivers Trace. The Trace Repetitions window, shown in Figure B, will prompt you for the number of repetitions (reboots and traces) to run. Go with the defaults and click OK.
BootVis will now provide you with a 10-second countdown before it reboots the system and performs the trace, giving you time to cancel the reboot and close any applications you might have left running. Click Reboot Now to bypass the countdown or Cancel to cancel the reboot.
Select the number of reboots and driver traces for BootVis to run.
Once the system reboots, BootVis restarts automatically and provides individual graphs for the following system activity areas (This can take a few minutes, so be patient.):
- Boot activity
- CPU usage
- Disk I/O
- Disk utilization
- Driver delay
- Process creates
Reading the boot activity graph
The Boot Activity graph (shown in Figure C) breaks the boot process down into the following components:
- Disk: The time required to detect all devices in the nonpageable device path. This entry can include any device from the CPU to the boot disk. This value should be around two seconds.
- Driver: The time required to initialize devices.
- Prefetching: The time required to read pages that are later used to initialize devices. This entry also includes Winlogon, services, the shell, and any applications loaded when the system boots.
- Registry + Page File: The time required to read the registry and initialize the page file.
- Video: The time spent setting the display mode and refresh rate. This time is affected by both the video BIOS and the video driver used.
- Logon + Services and Shell: The time required to startWinlogon, any services, the shell, and any applications, such as firewall or antivirus software, that are run when XP starts.
Here is the BootVis boot activity graph.
The components are displayed in the order in which XP calls them and are read from the bottom up. Each component’s bar begins at the point in the boot sequence when the component was called and the bar’s length reflects the time in seconds required to load the component. To determine the time required for any individual component activity, place the cursor over the title for the component.
To get the most important number, the time used to boot the system, place the cursor over the vertical line that crosses through all the components. This line represents the time the system took to boot. In the example in Figure C, the system required 33.84 seconds to complete the boot process.
One item of note, this boot time is dependent on the time it takes the user to enter the logon password, if one is required. Make sure to enter the password as quickly as possible when testing a system.
Optimizing the boot process
Now that you have an indication of how well the boot process is going, the next step is to optimize the system. To optimize your system boot, click Trace | Optimize System, and BootVis will present you with a 10-second countdown before rebooting. When the system reboots, the window shown in Figure D will appear, indicating that BootVis is using information gained from the previous boot and the current boot to optimize the system.
BootVis is optimizing the system.
The next window, shown in Figure E, appears when BootVis actually begins to place the files specified in the Layout.ini file in the area of contiguous disk space created during the defragmentation process run prior to using BootVis.
This shows BootVis organizing files on the hard disk.
When the window shown in Figure E closes, restart BootVis and run another boot trace by clicking File | Next Boot + Driver Trace. This will allow you to see how much improvement was gained from the optimization process.
Figure F shows the results on my test machine. After running the optimization, the boot time was reduced to 30.85 seconds — a difference of almost three seconds. As I mentioned earlier, this value is affected by the time it takes to enter a logon password, so enter the password as quickly as possible. While three seconds may not seem like a lot, I have seen this value change by as much as 10 seconds. And in today’s world, where we expect instant-on computers, every second counts.
BootVis reduced my test machine’s boot time by nearly three seconds.
Identifying driver problems
Now that you know how to optimize a machine’s boot process with BootVis, let’s look at how to troubleshoot boot issues involving problem drivers. BootVis can identify drivers that cause problems during the boot process and will indicate them on the Driver Delay graph, shown in Figure G, with a red bar.
Fortunately, my test machine does not have driver issues. If it did, I would check the manufacturer’s Web site for the latest drivers.
BootVis reports no driver delays on my test machine. If it did, they would have appeared in red.
BootVis can only do so much
BootVis tries to optimize the XP boot process as much as possible, but it can’t work miracles. If a machine loads antivirus, firewall, and/or e-mail programs when booted, BootVis can only do so much. Remember the phrase “Your mileage may vary,” and use BootVis within the context of how you use your system. This will help you achieve a compromise between a fast boot and a system you can work with as soon as it boots to XP.