Vista performance analysis: Get boot performance data using xperf

  
                  The startup speed of the Vista system on the notebook is getting slower and slower. The scroll bar at startup needs to be rolled for dozens of laps to complete. After the Explorer displays the desktop, the system startup is completed, it takes more than 4 minutes. Are you intolerable? . I wanted to reinstall the system, but the cost of reinstalling was too great. I needed to reconfigure too many things. So I thought that if I found the key bottleneck of startup performance, I should be able to solve some problems after optimizing this bottleneck. To solve the problem, we need to accurately collect relevant performance information. We know that in the Windows XP era, you can use the Bootvis tool to collect relevant information. Bootvis:
A tool designed to collect and analyze the speed of Windows XP startup. It was unfortunately mistaken to think of XP's startup speed optimization tool. However, due to the revolution of the Windows Vista kernel system and the introduction of a new boot mode, BootVis is certainly not competent. It seems that we need to find a better way to get Windows Vista related performance data. The Microsoft Windows Performance Toolkit (xperf for short) is a new tool that Microsoft has recommended for the past time to measure Windows performance, suitable for Windows Vista or higher. The latest version is 4.1.1.1. It can be downloaded for free here. The process of installing xperf is very simple. After the installation is complete, you need to start collecting relevant performance data. This time I am concerned about the startup speed of Windows Vista, so I need to collect data from the Boot phase. Start cmd.exe in administrator mode, then enter the xperf installation directory, enter the following command:
xbootmgr.exe -trace boot
After entering this command, xbootmgr will automatically restart the system, and then start collecting relevant startup information. data. After the reboot is complete, xbootmgr will wait for the explorer to start all, and generate a log file (extension: etl) to the xperf installation directory. Below we need to analyze this file. There are many ways to analyze the process. The easiest way is to enter the command line mode and switch to the xperf installation directory. Enter:
xperf -i boot_BASE+CSWITCH_1.etl -o boot.xml -a boot
Command automatically Analyze and then output an xml report file. Below I am going to talk about a more detailed analysis process.
1. Open the etl file: Using the xperfview boot_BASE+CSWITCH_1.etl command, the xperfview tool is called to perform a detailed parsing of the etl file. The etl file is xperf's original performance data file, which records all the collected data. 2.xperfview After parsing is completed, you will see a picture similar to the following:

Find the process lifetimes category (above), you will find the first user state process smss in the system when it is more than 50 seconds. The .exe is started (process ID: 748) and the previous time is spent on system. In other words, the various drivers running in kernel mode, including the Windows kernel and the executable, took more than 50 seconds to complete the initialization before the startup subsystem, which took too long. 3. Since it took more than 50 seconds to initialize the Windows kernel and the executable, this is very abnormal, because we need to look at the details in these 50 seconds. In Disk Utilization by process, select the time period of 0-50 seconds:


Copyright © Windows knowledge All Rights Reserved