Windows performance analyzer wpa

Здравствуйте, уважаемые читатели сайта remontcompa.ru! Меня зовут Роман Нахват и в сегодняшней статье мы поговорим о прекрасном инструменте под названием — Windows Performance Analyzer (WPA), который как никто другой произведёт диагностику автозапуска программ Windows и покажет, сколько времени отнимает у загрузки вашей операционной системы та или иная программа.

– Почему именно Windows Performance Analyzer? – Спросите вы! Ведь она самая сложная в этом отношении.

Да, в цифровом мире существует много программ, пользоваться которыми избегают обычные пользователи по причине их сложности, предпочитая более простые. Но уверяю вас, с Windows Performance Analyzer вам просто не хватило времени разобраться, а разобраться стоит, так как на данный момент не существует инструмента способного его заменить. К примеру, чтобы определить какая именно программа тормозит загрузку вашей Windows, нужно узнать время загрузки (в миллисекундах) всех приложений по отдельности, загружающихся вместе с ОС, также необходимо узнать время загрузки всех системных процессов по одному. Справится с этим только Windows Performance Analyzer.

Чтобы всё было как можно понятнее, разберём конкретный случай. Я установил себе на компьютер программы: Skype, uTorrent, Download Master и FTP-клиент FileZilla, после этого система стала долго загружаться, определим виновника с помощью WPA.

Ещё в конце статьи мы перенесём операционную систему Windows 8.1 с тестового компьютера на твердотельный накопитель «Kingston SSDNow UV400» и произведём повторные измерения скорости загрузки программ, стартующих после запуска операционной системы.

{banner_google1}

Средство Windows Performance Analyzer входит в состав Windows ADK (будем использовать версию 1703) для Windows 10, скачать можно здесь:

Запускаем установку.

Далее

Далее

Принимаем лицензионное соглашение

Ставим галочку напротив «Набор средств для оценки производительности Windows» и выполняем установку «Windows Performance Analyzer» на компьютер нажав «Установить»

Установка завершена.

Если запустить Диспетчер задач на тестовом компьютере и перейти на вкладку «Автозагрузка», то можно увидеть список программ, которые загружаются когда пользователь входит в систему. Также стоит обратить внимание на столбец «Влияние на загрузку», в котором напротив каждой программы стоит своего рода оценка, указывающая, какое влияние оказывает та или иная программа на скорость запуска операционной системы. Влияние программ из автозагрузки на запуск операционной системы может быть «Высокое»«Среднее» и «Низкое». Далее мы увидим, каким же образом операционная система выставляет оценку влияния той или иной программе. На вкладке «Автозагрузка» видно, что к примеру программы Skype и Download Master оказывают высокое влияние на скорость запуска операционной системы. 

{banner_google1}

Если перейти по пути C:\Windows\System32\wdi\LogFiles, то мы можем увидеть папку StartupInfo, а также файлы BootCKCL.elt и ShutdownCKCL.etl. Нас в данной статье будет интересовать файл BootCKCL.elt и далее именно с ним мы и будем работать, так как при каждой загрузке операционной системы Windows в файл BootCKCL.elt записывается различная информация о запуске процессов на компьютере, загруженности жёсткого диска и процессора.

Файл BootCKCL.elt мы будем изучать при помощи инструмента Windows Performance Analyzer, который как уже говорилось выше, входит в состав «Windows ADK»

Запускаем инструмент Windows Performance Analyzer.

Главное окно WPA.

Откроем файл «BootCKCL.etl». Для этого выбираем File — Open.

Указываем местоположение файла BootCKCL.etl, находится он по адресу: C:\Windows\System32\wdi\LogFiles

и жмём «Открыть»

После открытия файла BootCKCL.etl мы увидим различные графики, с которыми и будем работать.

Нажимаем на треугольник пункта (Computation), показанный стрелкой, находим график с названием «CPU Usage (Precise)» и мышкой перетягиваем его в окно «Analysis» 

{banner_google1}

Должно получиться примерно следующее, а именно в нижней части окна откроется таблица со списком различных работающих в нашей системе процессов.

Щёлкнем правой кнопкой мыши по заглавию какого-либо столбца из таблицы.

и вызовем контекстное меню. После этого добавим в таблицу столбец под названием «CPU Usage (in view)», поставив галочку напротив 

Столбец «CPU Usage (in view)» добавлен в таблицу. 

В столбце «New Process» выделяем процессы программ из автозагрузки, а именно Skype.exe, uTorrent.exe, dmaster.exe, Cloud.exe, filezilla.exe 

Вызываем контекстное меню и отфильтровываем выделенные процессы, выбрав «Filter To Selection» 

Получаем следующее.

В столбце «CPU Usage (in view) (ms)» напротив каждого процесса находится определенное числовое значение в миллисекундах, например для процесса «Skype.exe» оно равно 5263,425473, а для процесса «dmaster.exe» — 1119,308324. Данные числа напрямую связаны со степенью влияния программ из автозагрузки (которая как мы уже выше выяснили бывает высокой, средней или низкой, и мы это видели запустив диспетчер задач и перейдя на вкладку «Автозагрузка») на скорость запуска операционной системы следующим образом: влияние программы на скорость запуска операционной системы оценивается по количеству процессорного времени а также объёма дисковой активности.

Параметры влияния на скорость загрузки Windows следующие: имеет место высокая степень влияния, если приложение использует более 1000 миллисекунд ( более 1 секунды) времени процессора или свыше 3 mb дисковых операций; средняя степень влияния — если приложение использует от 300 до 1000 миллисекунд ( от 0.3 до 1 секунды) времени процессора или от 300 kb до 3 mb дисковых операций; низкая степень влияния — если приложение использует менее 300 миллисекунд (0.3 секунды) времени процессора и менее 300 kb  дисковых операций.

Исходя из этого видим, что процесс «Skype.exe» использовал 5263,425473 мс (5.26 секунды) процессорного времени, следовательно он оказывал высокую степень влияния на запуск Windows 

{banner_google1}

Создадим ещё одну вкладку «Analysis» и перетянем на нёё график с названием «Lifetime by Process» 

Получаем следующее

Выделяем нужные нам процессы таким же образом, как мы это делали на графике «CPU Usage (Precise)»

Например выделим процесс «explorer.exe»,

а также процессы программ из автозагрузки, а именно «uTorrent.exe»«dmaster.exe»«Skype.exe»«Cloud.exe» и «filezilla.exe»

Отфильтруем выбранные процессы, выбрав «Filter To Selection»

Получаем следующее:

В Windows 8.1, 10 снижено влияние программ сторонних разработчиков в автозагрузке на скорость запуска операционной системы. Запуск сторонних приложений происходит только после старта всех системных процессов и появления рабочего стола. Сделано это специально, чтобы программы не тормозили ОС во время старта. В столбце «Start Time (s)» напротив каждого процесса указано время (в секундах), через которое программа начала стартовать после запуска операционной системы. К примеру программа «uTorrent» начала стартовать через 45.4 секунд после запуска Windows, а программа «Download Master» начала стартовать через 49.8 секунд. 

{banner_google1}

Все статьи о переносе операционных систем находятся на нашем сайте в этом разделе. 

Развернем заранее созданную резервную копию тестового компьютера с Windows 8.1 на твердотельный накопитель «Kingston SSDNow UV400» используя загрузочный диск Acronis True Image 2018

Жмём «Приступить».

 

Восстановление Windows 8.1 успешно завершено.

После восстановления системы на твердотельный накопитель «Kingston SSDNow UV400» снова запускаем Диспетчер задач и заходим на вкладку Автозагрузка. Видим, что теперь программа FileZilla оказывает среднее влияние на скорость запуска Windows 8.1

Переходим по пути C:\Windows\System32\wdi\LogFiles и копируем с тестового компьютера файл BootCKCL.etl.

Файл BootCKCL.etl скопированный с тестового компьютера.

Запускаем инструмент Windows Performance Analyzer.

Открываем файл «BootCKCL.etl», выбрав File — Open.

Открыть.

{banner_google1}

Так же, как это мы делали выше, перетягиваем график «CPU Usage (Precise)» в окно «Analysis»

В столбце «New Process» выделяем процессы программ из автозагрузки, а именно Skype.exe, uTorrent.exe, dmaster.exe, Cloud.exe, filezilla.exe.

Вызвав контекстное меню отфильтровываем выделенные процессы, выбрав «Filter To Selection».

Как видим, процесс«filezilla.exe» использовал 507,442282 мс (0.507 секунды) процессорного времени, следовательно он оказывает среднюю степень влияния на запуск Windows. То же самое мы видели на вкладке Автозагрузка в Диспетчере задач.

Если проанализировать график «Lifetime by Process», как мы это делали выше, то можно увидеть, что системный процесс explorer.exe запустился через 5.4 секунды после запуска ОС (до переноса ОС на твердотельный накопитель процесс explorer.exe запускался через 29.1 секунду после запуска ОС), а программа Skype запустилась через 28.2 секунды (до переноса ОС на твердотельный накопитель программа Skype запускалась через 52 секунды)

Статьи на эту тему:

  1. Автозагрузка Windows 10
  2. Autoruns – одна из лучших программ для ускорения автозагрузки Windows
  3. Долгая загрузка Windows 10. Или как быстро определить, какое именно приложение более всего тормозит загрузку операционной системы
  4. Оптимизация автозагрузки Windows программой Autorun Organizer

The Windows Performance Analyzer (WPA) tool is a part of the Windows Assessment and Deployment Kit (Windows ADK). It’s the tool you can use to create graphs and tables based on event trace log recordings. You make these trace files using tools like Xperf or Windows Performance Recorder (WPR). These tools are useful if you have system performance issues. You can also use them regularly for performance monitoring.

In this article, you’ll learn how to create a quick recording using the WPR. You should launch this recording during an event where you want to test the performance of your computer. This could be launching a game or other application or even running a program you’ve written. Then, we’ll cover how to use the WPA tool to read and analyze that data file for troubleshooting purposes.

Installing and Launching Microsoft Windows ADK Tools

The first step to install both the WPA and WPR is to install Windows ADK from Microsoft’s download page for the Windows Performance Toolkit. This tool is from Microsoft.com, so completely safe to install. As you step through the installation process, you’ll need to choose the components you want to install. 

Just make sure that the Windows Performance Toolkit is selected since this includes both tools you need.

Once you select Install, the process can take time, so be patient.

When the Windows Performance Toolkit installation is complete, you’re ready to make your first WPR recording. 

Note: For this example, we’ve installed the HeavyLoad Stress Test app to put our system under a heavy load while the WPR recording occurs.

Before using the Microsoft Windows Performance Analyzer tool, you’ll need to use the Windows Performance Recorder to capture an event trace log recording (an ETL file).  This recording will contain all Event Tracing for Windows (ETW) events. WPA analyzes all system information about CPU, memory, storage, and more.

To launch WPR, select the Start menu and type “Windows Performance Recorder.” Next, select the Windows Performance Recorder app. 

The WPR tool is a straightforward tool to capture events occurring on your system during a specific timeframe. To start the recording, just select the Start button. 

This will launch the system event recording process. Perform actions (like launching and running a program) that you want to use to test your system’s performance. 

Once finished, just return to the WPR window and select the Save button. 

The next step will display the path to your ETL file. You can include a description of what you’re troubleshooting or testing in the detailed description window.

When done, select the Save button.

The app will write all data to the ETL file, and you’ll see options at the bottom of the window to open the WPA tool directly or navigate to the ETL file by opening the folder.

The most convenient way to immediately move on to your performance analysis is to select the Open in WPA button. 

Analyzing ETL Files with Windows Performance Analyzer

Once you double-click the WPA app and it launches, you’re ready to start navigating through and visualizing the data in the ETL file. This is a special log file only certain apps can open. You couldn’t view it using something like Google Docs or Microsoft Word.

You’ll notice along the left side there are four major categories of data to explore. You can select any of these charts on the left to see them displayed in more detail in the right pane.

These categories include:

  • System Activity: Process information, background tasks, events, and more.
  • Computation: All information related to CPU cores.
  • Storage: Disk usage information.
  • Memory: Real and virtual memory usage.
  • Power: Processor power usage details.

In each chart, like the CPU Usage chart, you can hover over any graph area to see a breakdown of the data components like process name, process active time, and percentage of overall CPU usage.

If you select a specific process name from the list at the bottom, you’ll see highlighted areas in the graph to identify the specific times that process consumed CPU resources. This can help identify whether operating system processes or application processes are eating up all CPU time.

You can also drill down into each process to see specific stack activity, again with the graph above highlighting areas when that stack was actively using CPU time.

Available Charts in WPA

Inside each of the four major categories in the left pane, you’ll find a graph explorer that can help you analyze and troubleshoot what’s happening with your system performance.

We’ve covered the System Activity list above. Below this, you’ll find the Computation category. 

Here you’ll find the following sub-charts:

  • CPU Usage (Sampled): Samples of CPU activity taken at sampling intervals. 
  • CPU Usage (Precise): CPU usage associated with specific running process threads.
  • DPC/SR Duration: CPU time spent servicing deferred procedure calls (DPCs). 
  • CPU Usage (Attributed): CPU usage broken down into several categories.

Again, you can select any of these sub-charts to display them on the right. Or you can drill down further into more sub-charts related to each of these areas.

The Storage category has several disk usage sub-visuals underneath it in the left navigation pane.

You can view overall lDisk Usage or drill down into any of the following sub-visuals:

  • Disk activity
  • Disk Counts
  • Disk Offset
  • IO Time 
  • Service Time
  • Disk Size
  • Disk Throughput
  • Disk Utilization

Adding one or more of these to the same pane on the left lets you compare different aspects of disk usage to one another. This kind of comparison alongside visuals related to processes or CPU time could potentially help you identify the source of your Windows performance problems.

The next category in the left navigation pane is Memory.

You’ll find the following charts under the Memory category:

  • Memory Utilization
  • Fault Counts
  • Fault IO Time
  • Virtual Memory Snapshots

Finally, the last category in the list is Power. These are all visuals related to your system’s overall CPU power consumption.

This includes all of the following sub-visuals around all system processors like CPUs and GPUs:

  • CPU Frequency
  • CPU Idle States and State Diagram
  • System Latency Tolerance
  • Processor Profiles 
  • Processor Parking State
  • Core Parking State
  • Processor Performance
  • Processor Constraints

Other Microsoft WPA Features

There are several useful features in the WPA tool that’ll help you with your troubleshooting efforts.

One of those is an Analysis Assistant. You can find this by selecting the Window menu and selecting Analysis Assistant.

This opens up a new pane in the tool that will give you tips and details about the charts or items inside the charts that you click on. 

This is especially useful if you aren’t that familiar with all of the terminology used throughout the tool.

If you select the Window menu and select New Analysis View, you can open a new Analysis tab.

This lets you perform multiple analyses by adding a family of visuals in one tab and then opening a new tab to perform a completely different set of visuals without losing your previous analysis. Flip back and forth between tabs to work on each analysis individually.

Exploring Windows Performance Analyzer Further

If you’d like to dig even further into WPA, Microsoft has an old Microsoft Docs guide. The documentation isn’t being maintained anymore, but it should point you in the right direction. It even includes a full command line reference you can use to run WPA commands from the command prompt.

As you can see, the Windows Performance Analyzer tool is much more flexible and useful than standard performance tools that come installed on Windows by default. So, the next time your Windows system starts acting unusual, take the time to download the Windows ADK and give WPR and WPA a try.

If you’re using Linux (or Android), a GitHub Linux version of a similar tool is available using the Microsoft Performance Toolkit.

Related Posts

  • How to Fix a “This file does not have an app associated with it” Error on Windows
  • How to Fix an Update Error 0x800705b4 on Windows
  • How to Resolve “A JavaScript error occured in the main process” Error on Windows
  • How to Fix the Network Discovery Is Turned Off Error on Windows
  • How to Change Folder Icons in Windows

This is an excerpt of https://github.com/microsoft/terminal/issues/16983#issuecomment-2034681234


When you open it, it’ll look something like this:

image

Each tab can contain an arbitrary number of panes. When you click on the graph types on the left, new panes will be added to the current tab. As such, I usually first close all tabs and then open the graph that I want. In this case we want the «Virtual Allocations» graph which is in the «Others» section on the left. This will list all the processes that were recorded:

image

In the table view, everything to the left of the vertical yellow line are columns which group data and everything to right of the yellow line is an aggregate. It’s a little bit like working with a database. Basically, everything to the left «maps» / «groups» and everything to right «reduces» / «sums».

Columns in WPA are special however: They can have complex rules and configurations to customize everything to your liking. If you’re interested in this, click on the wheel icon at the top of the pane (next to the red «3» marker).

Here you can do a couple things, which I’ve marked with the red numbers:

  1. By right clicking on the process(es) that you actually want, you get to choose «Filter to Selection», which will remove all the noise.
  2. By right clicking on the headers of the table you can choose which columns to see. Here you can choose «Stack». The «Stack» column is configured by default to be to the left of the yellow line. That way you get a cumulative amount of allocations per stack trace.
  3. The graph button allows you to switch to a «Flame» (-graph) which is IMO the most useful view. If you aren’t familiar with flame graphs: Each bar is a function call and it represents your call stack. The width of each bar represents the percentage it makes up compared to the total. For instance if your app allocates 1GB of memory and 1 function allocates 100MB, then its bar will be exactly 10% wide.
  4. Here you can change the view to hide the table and only show the graph. There’s a «maximize» button which you can click to resize the pane to fit the tab size.

To get function names you have to load symbols. Unfortunately, even if you use a «Filter» it’ll load symbols for all applications by default. This takes a long time. So what you can do is add a filter for symbol loading:

image

At the end it’ll look something like this:

image

This page provides the install, setup and usage instructions for Windows Performance Analyzer (WPA) and use it to analyze MsQuic traces.

Install Instructions

The following are currently only possible on Windows. Other platforms may be supported by WPA in the future.

Install WPA

Download the preview version from the Windows Store or (for MSFT internal) from http://aka.ms/getwpa.

Download MsQuic WPA Plugin

  1. Navigate to our GitHub Action for building the plugin.
  2. Click on the latest build.
  3. Scroll to the bottom and download the ptix_quictrace_Release artifact.
  4. Extract the .ptix file.

Install the Plugin

  1. Open WPA and use the Install Plugin dialog to install the MsQuic WPA plugin.
  2. Restart WPA.

Usage Instructions

WPA is extremely powerful. It can operate very quickly on multi-gigabyte trace files and let you slice & dice the data many different ways to really drill down into what’s going on.

Load trace file

ETW trace

Select and Open .etl file

LTTng trace

  • Directory
    • Select directory which includes traces. WPA automatically traverses and find trace files.
  • File
    1. Compress the directory as zip
    2. change the extension to .ctf
    3. Select the .ctf file

Call stacks and CPU Usage

Windows

One of the built-in capabilities of WPA is the ability to analyze CPU trace information to see the CPU usage of the various call stacks in the code. For instance, in the above Flame Graph you can easily see that the most expensive function (58% of total CPU usage!) is CxPlatEncrypt.

Linux

Linux perf command is one of the way to collect such information.

# on Linux (kernel > 5.10)
sudo apt-get install -y linux-perf
# on Linux (kernel <= 5.10)
sudo apt-get install -y linux-tools-`uname -r`
# use your own options
perf record -a -g -F 10 -o out.perf.data
# ".perf.data.txt" extension is required for later visualize on WPA
perf script -i out.perf.data > out.perf.data.txt

Visualize perf artifact on WPA

The perf command’s artifact can be visualized on Windows through WPA.
Follow steps below to load perf extension on WPA.

# on Windows
cd ${WORKDIR}
git clone https://github.com/microsoft/Microsoft-Performance-Tools-Linux-Android
cd .\Microsoft-Performance-Tools-Linux-Android\PerfDataExtensions
dotnet build
# use absolute path
wpa.exe -addsearchdir ${WORKDIR}\Microsoft-Performance-Tools-Linux-Android\PerfDataExtensions\bin\Debug\netstandard2.1\
# Open out.perf.data.txt on WPA. You might need to open multiple time if you see error at opening (known issue?)

Change visualization type by drop down menu as shown in image below. Also you can filter in data for each CPU etc.

TODO — Add more details/instructions.

QUIC Charts and Tables

TODO

This article explains how to use Windows® Performance Analyzer (WPA) to troubleshoot performance issues in Windows.
The free Windows Assessment and Deployment Kit (ADK) includes both the WPA and the Windows Performance Recorder (WPR). Use the WPA to create tables and graphs of performance data and events that the WPR captures. You can download the ADK directly from Microsoft.

After you download the ADK, open the WPA application. The tool gathers information about the interaction of programs and hardware running on the server. Click Start to start recording by using the default settings. If you want to customize the recording, expand the options menu by clicking on More options. Here, you can select additional profiles for performance recording, such as GPU activity, power usage, and pool usage. After you are satisfied with the recording’s length, click Save to stop recording and select a path for the event trace log to be stored. You can now directly import the file into WPA by clicking Open in WPA.

To start the WPA application, click on the Windows button on your desktop and type WPA. Use the following steps to open an existing trace log file in WPA:

  1. In the File menu, click Open.

  2. Navigate to the file’s location. By default, event trace log files are stored in your Documents\WPR Files folder.

  3. Select the file and click Open.

You can use the Graph Explorer to see all the available performance recordings. To view different graphs in more detail, expand them by clicking the small triangle icon. To further analyze the data, double-click or drag-and-drop the graph into the right-hand side Analysis panel. You can open multiple graphs in the Analysis tab by using this method. Also, you can open multiple Analysis tabs by clicking on the + icon. In the top bar, you can change the graph view and layout.

To select a specific time interval to analyze, perform the following steps:

  1. Left-click on the graph and hold down the mouse.
  2. Drag the cursor to highlight the desired section.
  3. To view the selected time frame in more detail, right-click it and select Zoom.

To customize the data table view, drag-and-drop the columns to change their order and right-click to choose which columns you want to display. You can also search the data by right-clicking on the data column and selecting Find. If you want to save a layout for later use, export it by clicking Profiles and Export…. You can also select Save Startup Profile to make this the default layout when you start WPA.

Updated 2 months ago


Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как открыть cpu z на windows 10
  • Msdart диск восстановления windows
  • Which windows explorer view allows you to sort files by type
  • Windows restart button not working
  • Как проверить совместимость комплектующих пк с windows 10