19
Slide 1 of 19 Code Optimization and Performance Tuning Using Intel VTune In this session, you will learn to: Obtain Tuning Advice Reports Objectives

08 intel v_tune_session_11

Embed Size (px)

Citation preview

Page 1: 08 intel v_tune_session_11

Slide 1 of 19

Code Optimization and Performance Tuning Using Intel VTune

In this session, you will learn to:Obtain Tuning Advice Reports

Objectives

Page 2: 08 intel v_tune_session_11

Slide 2 of 19

Code Optimization and Performance Tuning Using Intel VTune

Tuning assistant displays information about possible solutions in the form of tuning advice reports. Tuning advice report:

Provides information about performance-related issues and insights on the causes of the issues.Provides you with a detailed description of suggestions or insights.

Each insight includes links that enable you to obtain more information about the insight. The tuning assistant displays the tuning advice report for event-based sampling results and counter monitor results.

Getting Tuning Advice Reports

Page 3: 08 intel v_tune_session_11

Slide 3 of 19

Code Optimization and Performance Tuning Using Intel VTune

Tuning assistant is available for only event-based sampling data and not for time-based sampling data. When you invoke tuning assistant for event-based sampling data, the tuning advice report:

Indicates the problems.Suggests solutions for each selected module, process, or function in the sampling view.

Obtaining Tuning Advice Reports For Event-Based Sampling

Page 4: 08 intel v_tune_session_11

Slide 4 of 19

Code Optimization and Performance Tuning Using Intel VTune

To start using tuning advice reports for sampling data, you need to:

Invoke the sampling wizardSet the levels of analysis of sampling dataSet options for sampling activity resultsAnalyze the insights and tuning advice

Obtaining Tuning Advice Reports For Event-Based Sampling (Contd.)

Page 5: 08 intel v_tune_session_11

Slide 5 of 19

Code Optimization and Performance Tuning Using Intel VTune

You can select the Automatically Generate Tuning Advice check box in the sampling wizard to obtain the tuning advice report. Alternatively, you can select the Get Tuning Advice option from the View menu option on the menu bar to invoke the tuning assistant.

Obtaining Tuning Advice Reports For Event-Based Sampling (Contd.)

Page 6: 08 intel v_tune_session_11

Slide 6 of 19

Code Optimization and Performance Tuning Using Intel VTune

Set the levels of analysis:One sampling run with minimal adviceA few sampling runs with some adviceMany sampling runs with more advice

Obtaining Tuning Advice Reports For Event-Based Sampling (Contd.)

This option enables you to instruct the sampling collector to monitor only the events associated with the clockticks per instruction retired. In this case, the tuning advice report contains a small amount of advice for specified events.

This option enables you to instruct the sampling collector to monitor only the events used for:

Basic application level tuningBasic microarchitectural-level tuning

This option enables you to instruct the sampling collector to monitor only the events used for:

In-depth application level tuningBasic microarchitectural-level tuning

Page 7: 08 intel v_tune_session_11

Slide 7 of 19

Code Optimization and Performance Tuning Using Intel VTune

The various categories of insights that you can view in a tuning advice report are:

Top insights Workload insightsModule insightsHotspots insightsSystem infoStatic analysis

Obtaining Tuning Advice Reports For Event-Based Sampling (Contd.)

These are insights that are estimated to have significant impacts on performance. Performance impact enables you to identify the maximum optimization that you can achieve for the application.

►These are performance issues for all modules and processes

►Insights on performance issues for the modules in an application

►These are insights on performance issues based on functions that are sorted by percentage of CPU time.

►Summarizes the features that the system uses, such as the speed of the processor and the name of the operating system

►Enables you to view information about possible optimizations to improve application performance

Page 8: 08 intel v_tune_session_11

Slide 8 of 19

Code Optimization and Performance Tuning Using Intel VTune

What is tuning advice?

Just a minute

Answer:Tuning advice is a possible solution to remove a performance problem.

Page 9: 08 intel v_tune_session_11

Slide 9 of 19

Code Optimization and Performance Tuning Using Intel VTune

What is an insight?

Just a minute

Answer:An insight is a performance issue that can act as a bottleneck to the performance of an application.

Page 10: 08 intel v_tune_session_11

Slide 10 of 19

Code Optimization and Performance Tuning Using Intel VTune

Tuning assistant enables you to analyze the results of the counter monitor data in counter view. Tuning assistant creates a tuning advice report that describes potential bottlenecks to application performance. The tuning advice report for the results of counter monitor data also provides suggestions on avoiding or removing the performance issues.

Obtaining Tuning Advice Reports For Counter Monitor Data

Page 11: 08 intel v_tune_session_11

Slide 11 of 19

Code Optimization and Performance Tuning Using Intel VTune

What is relevance score?

Just a minute

Answer:Relevance score indicates relevance of a particular insight or advice.

Page 12: 08 intel v_tune_session_11

Slide 12 of 19

Code Optimization and Performance Tuning Using Intel VTune

Problem Statement:Jim Lewis, a software developer, has developed an application in C#, MyApp, which involves the use of a two-dimensional matrix. He needs to analyze the performance of the application by collecting sampling-based data. Jim wants to invoke tuning assistant to view the tuning advice report. In addition, Jim needs to analyze and identify the performance issues in the application. He also needs to analyze the advice on performance issues using the tuning advice report. How will Jim perform this task?

Activity: Analyzing Data Using the Tuning Advice Report – 1

Page 13: 08 intel v_tune_session_11

Slide 13 of 19

Code Optimization and Performance Tuning Using Intel VTune

SolutionTo analyze the performance of the application by collecting sampling-based data and using tuning assistant, you need to perform the following tasks:

1. Collect sampling-based performance data.2. Invoke tuning assistant and analyze tuning advice and insights for

sampling data.

Activity: Analyzing Data Using the Tuning Advice Report – 1 (Contd.)

Page 14: 08 intel v_tune_session_11

Slide 14 of 19

Code Optimization and Performance Tuning Using Intel VTune

Problem Statement:Chris has developed an application in Java, which involves the use of a two-dimensional matrix. However, on execution, he finds that his application is performing very slowly. Therefore, he decides to analyze the performance of his application by collecting sampling-based data. In addition, he also wants to invoke the tuning assistant to get the tuning advice report. Help Chris to accomplish his task.

Activity: Analyzing Data Using the Tuning Advice Report – 2

Page 15: 08 intel v_tune_session_11

Slide 15 of 19

Code Optimization and Performance Tuning Using Intel VTune

SolutionTo analyze the performance of the application by collecting sampling-based data and using tuning assistant, you need to perform the following tasks:

1. Collect sampling-based performance data.2. Invoke tuning assistant and analyze tuning advice and insights for

sampling data.

Activity: Analyzing Data Using the Tuning Advice Report – 2 (Contd.)

Page 16: 08 intel v_tune_session_11

Slide 16 of 19

Code Optimization and Performance Tuning Using Intel VTune

To optimize the application, you can compare multiple activity results. Comparing the results enables you to identify thebest-optimized code and enhance application performance.

Comparing Activity Results

Page 17: 08 intel v_tune_session_11

Slide 17 of 19

Code Optimization and Performance Tuning Using Intel VTune

In this session, you learned that: The tuning assistant displays information about possible solutions in the form of tuning advice reports.The two types of tuning advice reports that the tuning assistant displays are:

Event-based sampling activity results Counter monitor activity results

To start using tuning advice reports for sampling data:Invoke the sampling wizardSet the levels of analysis of sampling dataSet options for sampling activity resultsAnalyze the insights and tuning advice

Summary

Page 18: 08 intel v_tune_session_11

Slide 18 of 19

Code Optimization and Performance Tuning Using Intel VTune

The various categories of insights that you can view in a tuning advice report for event-based sampling activity are:

Top insightsWorkload insightsModule insightsHotspots insightsSystem infoStatic analysis

The tuning assistant enables you to analyze the results of the counter monitor data in the counter view.The tuning advice report for the results of counter monitor data also provides suggestions on avoiding or removing the performance issues. The tuning assistant enables you to compare the performance of an application across multiple activity results.

Summary (Contd.)

Page 19: 08 intel v_tune_session_11

Slide 19 of 19

Code Optimization and Performance Tuning Using Intel VTune

The tuning assistant enables you to compare sampling activity results across the same or different architectures.

Summary (Contd.)