インテル® VTune™ Amplifier 2018 ヘルプ

Window: Summary - Locks and Waits

Use the Summary window as your starting point of the performance analysis with the Intel® VTune™ Amplifier. To access this window, select the Locks and Waitsviewpoint and click the Summary sub-tab in the result tab.

Depending on the analysis type, the Summary window provides the following application-level statistics in the Locks and Waits viewpoint:

Note

You may click the Copy to Clipboard button to copy the content of the selected summary section to the clipboard.

Analysis Metrics

The Summary window displays a list of CPU metrics that help you estimate an overall application execution. For a metric description, hover over the corresponding question mark icon to read the pop-up help:

Use the Elapsed Time metric as your primary indicator and a baseline for comparison of results before and after optimization. Note that for multithreaded applications, the CPU Time is different from the Elapsed Time since the CPU Time is the sum of CPU time for all application threads.

For some analysis types, the Effective CPU Time is classified per CPU utilization as follows:

Utilization Type

Description

Idle

Idle usage. By default, if the CPU Time is insignificant (less than 50% of 1 CPU), such CPU usage is classified as idle.

Poor

Poor usage. By default, poor usage is when the number of simultaneously running CPUs is less than or equal to 50% of the target CPU usage.

OK

Acceptable (OK) usage. By default, OK usage is when the number of simultaneously running CPUs is between 51-85% of the target CPU usage.

Ideal

Ideal usage. By default, Ideal usage is when the number of simultaneously running CPUs is between 86-100% of the target CPU usage.

The Overhead and Spin Time metrics, if provided (depend on the analysis), can tell you how your application's use of synchronization and threading libraries is impacting the CPU time. Review the metrics within these categories to learn where your application might be spending additional time making calls to synchronization and threading libraries such as system synchronization API, Intel TBB, and OpenMP*. VTune Amplifier provides the following types of inefficiencies in your code taking CPU time:

Imbalance or Serial Spinning Time

Imbalance or Serial Spinning time is CPU time when working threads are spinning on a synchronization barrier consuming CPU resources. This can be caused by load imbalance, insufficient concurrency for all working threads or waits on a barrier in the case of serialized execution.

Lock Contention Spin Time

Lock Contention time is CPU time when working threads are spinning on a lock consuming CPU resources. High metric value may signal inefficient parallelization with highly contended synchronization objects. To avoid intensive synchronization, consider using reduction, atomic operations or thread local variables where possible.

Other Spin Time

This metric shows unclassified Spin time spent in a threading runtime library.

Creation Overhead Time

Creation time is CPU time that a runtime library spends on organizing parallel work.

Scheduling Overhead Time

Scheduling time is CPU time that a runtime library spends on work assignment for threads. If the time is significant, consider using coarse-grain work chunking.

Reduction Overhead Time

Reduction time is CPU time that a runtime library spends on loop or region reduction operations.

Atomics Overhead Time

Atomics time is CPU time that a runtime library spends on atomic operations.

Other Overhead Time

This metric shows unclassified Overhead time spent in a threading runtime library.

Depending on the analysis type, the VTune Amplifier may analyze a metric, compare its value with the threshold value provided by Intel architects, and highlight the metric value in pink as a performance issue for an application as a whole. The issue description for such a value may be provided below the critical metric or when you hover over the highlighted metric.

Each metric in the list shows up as a hyperlink. Clicking a hyperlink opens the Bottom-up window and sorts the grid by the selected metric or highlights the selected object in the grid.

Top Waiting Objects

This section lists the objects that spent the most time waiting in your application. Objects can wait on specific calls, such as sleep() or I/O, or on contended synchronizations. A significant amount of Wait time associated with a synchronization object reflects high contention for that object and, thus, reduced parallelism.

Clicking an object name in the table opens the Bottom-up grid grouped by Sync Object with the selected object highlighted.

Top Tasks

This section provides a list of tasks that took most of the time to execute, where tasks are either code regions marked with Task API, or system tasks enabled to monitor Ftrace* events, Atrace* events, Intel Media SDK programs, OpenCL™ kernels, and so on.

Clicking a task type in the table opens the grid view (for example, Bottom-up or Event Count) grouped by the Task Type granularity. See Task Analysis for more information.

Thread Concurrency Histogram

Use this histogram to identify the percentage of the wall time the specific number of threads were running simultaneously.

Use This

To Do This

Vertical bars

Hover over the bar to identify the amount of Elapsed time the application spent simultaneously running the specified number of threads. Threads are considered running if they are either actually running on a CPU or are in the runnable state in the OS scheduler.

For example, an application runs seven threads for 1.5s, waits for an event, and then runs again for 1.5s. The value for the 7th node for this application, is 1.5 + 1.5 = 3s

The last bar in the chart may contain a + indicator. This indicates that there were additional threads in the overutilized state and that the time for these threads is combined into one bar.

Target Concurrency

Identify the target concurrency level. This number is equal to the number of logical CPUs. Consider this number as your optimization goal.

Average

Identify the average number of threads running in parallel for the entire run. It is calculated as CPU time / Elapsed time.

For example, on a quad-core machine if an application used 2 cores for 1 second, did not use any cores for 1 second, and used all 4 cores for 1 second then the average CPU usage is calculated as follows: (2 * 1 + 0 * 1 + 4 * 1) / (1 + 1 + 1) = 6 / 3 = 2.

Unlike the CPU usage, the concurrency level of an application can be larger that the number of available logical CPUs, which means that the system is oversubscribed.

Use this number as a baseline for your performance measurements. The closer this number to the number of logical CPUs, the better.

Utilization Indicator bar

Analyze how the various utilization levels map to the number of simultaneously running threads.

CPU Usage Histogram

Explore the CPU Usage Histogram to analyze the percentage of the wall time the specific number of CPUs were running simultaneously.

Use This To Do This

Vertical bars

Hover over the bar to identify the amount of Elapsed time the application spent using the specified number of logical CPU cores.

Target Utilization

Identify the target CPU usage. This number is equal to the number of logical CPU cores. Consider this number as your optimization goal.

Average CPU Usage

Identify the average number of CPUs used aggregating the entire run. It is calculated as CPU time / Elapsed time.

CPU usage at any point in time cannot surpass the available number of logical CPU cores. Even when the system is oversubscribed, and there are more threads running then CPUs, the CPU usage is the same as the number of CPUs.

Use this number as a baseline for your performance measurements. The closer this number to the number of logical CPU cores, the better, except for the case when the CPU time goes to spinning.

Utilization Indicator bar

Analyze how the various utilization levels map to the number of simultaneously utilized logical CPU cores.

Note

In the CPU Usage histogram, the VTune Amplifier treats the Spin and Overhead time as Idle CPU usage. Different analysis types may recognize Spin and Overhead time differently depending on availability of call stack information. This may result in a difference of CPU Usage graphical representation per analysis type.

Correlate CPU Usage and Thread Concurrency data to identify potential performance issues:

If

Potential Performance Issue

Average CPU usage is close to target concurrency and average concurrency is much lower than target concurrency.

Parallel application with a lot of contention on spin locks

Average CPU usage and average concurrency are close to 1.

Serial application

Average CPU usage and average concurrency are almost the same, with values falling between 1 and target concurrency.

Parallel application with contention on usual synchronization-based locks

Both average CPU usage and average concurrency are close to target concurrency.

Good parallel application

Frame Rate Histogram

If you used the Frame API to mark the start and finish of the code regions executed repeatedly (frames) in your graphics application, the VTune Amplifier analyzes this data and helps you identify regions that ran slowly. Explore the Frame Rate Histogram section and identify slow and fast frame domains.

Use This

To Do This

Domain drop-down menu

Choose a frame domain to analyze with the frame rate histogram. If only one domain is available, the drop-down menu is grayed out. Then, you can switch to the Bottom-up window grouped by Frame Domain, filter the data by slow frames and switch to the Function grouping to identify functions in the slow frame domains. Try to optimize your code to keep the frame rate constant (for example, from 30 to 60 frames per second).

Vertical bars

Hover over a bar to see the total number of frames in your application executed with a specific frame rate. High number of slow or fast frames signals a performance bottleneck.

Frame rate bar

Use the sliders to adjust the frame rate threshold (in frames per second) for the currently open result and all subsequent results in the project.

Collection and Platform Info

This section provides the following data:

Application Command Line

Path to the target application.

Operating System

Operating system used for the collection.

Computer Name

Name of the computer used for the collection.

Result Size

Size of the result collected by the VTune Amplifier.

Collection start time

Start time (in UTC format) of the external collection. Explore the Timeline pane to track the performance statistics provided by the custom collector over time.

Collection stop time

Stop time (in UTC format) of the external collection. Explore the Timeline pane to track the performance statistics provided by the custom collector over time.

Collector type

Type of the data collector used for the analysis. The following types are possible:

CPU Information

Name

Name of the processor used for the collection.

Frequency

Frequency of the processor used for the collection.

Logical CPU Count

Logical CPU count for the machine used for the collection.

Physical Core Count

Number of physical cores on the system.

User Name

User launching the data collection. This field is available if you enabled the per-user event-based sampling collection mode during the product installation.

GPU Information

Name

Name of the Graphics installed on the system.

Vendor

GPU vendor.

Driver

Version of the graphics driver installed on the system.

Stepping

Microprocessor version.

EU Count

Number of execution units (EUs) in the Render and GPGPU engine. This data is Intel® HD Graphics and Intel® Iris® Graphics (further: Intel Graphics) specific.

Max EU Thread Count

Maximum number of threads per execution unit. This data is Intel Graphics specific.

Max Core Frequency

Maximum frequency of the Graphics processor. This data is Intel Graphics specific.

Graphics Performance Analysis

GPU metrics collection is enabled on the hardware level. This data is Intel Graphics specific.

Note

Some systems disable collection of extended metrics such as L3 misses, memory accesses, sampler busyness, SLM accesses, and others in the BIOS. On some systems you can set a BIOS option to enable this collection. The presence or absence of the option and its name are BIOS vendor specific. Look for the Intel® Graphics Performance Analyzers option (or similar) in your BIOS and set it to Enabled.

関連情報