《07IntelVTuneSession10》由会员分享,可在线阅读,更多相关《07IntelVTuneSession10(16页珍藏版)》请在金锄头文库上搜索。
1、Installing Windows XP Professional Using Attended Installation Slide 1 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneIn this session, you will learn to:Use the Tuning AssistantObjectivesInstalling Windows XP Professional Using Attended Installation Slide 2 of 16Ver. 1.0Code
2、Optimization and Performance Tuning Using Intel VTuneTuning assistant is a tool that provides with information that enables you to tune the performance of your application and the way it uses system resources.Using Tuning AssistantInstalling Windows XP Professional Using Attended Installation Slide
3、3 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneOnce the optimization goals are clear, you can tune your application at the following three levels:System-level tuningApplication-level tuningMicroarchitecture-level tuningUnderstanding the Tuning MethodologyInstalling Windows
4、XP Professional Using Attended Installation Slide 4 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneSystem-level tuning:Helps in optimizing the utilization of system resources.Speeds up the performance of the application by improving the way application interacts with the syst
5、em.Is significant for input/output (I/O) intensive applications. The performance of these applications depends on the performance of the I/O system that provides the I/O service.Can be achieved by using the counter monitor feature of VTune Performance Analyzer.Understanding the Tuning Methodology (C
6、ontd.)Installing Windows XP Professional Using Attended Installation Slide 5 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneApplication-level tuning:Helps in reducing the execution time of an application.Can be performed by improving the algorithms of the application, impleme
7、nting threads, and by using Application Programming Interfaces (APIs) and primitives.Can be achieved by identifying the code snippets that have a high impact on the performance of the application.Helps in identifying the code snippets by using the sampling or call graph feature of the VTune Performa
8、nce Analyzer.Understanding the Tuning Methodology (Contd.)Installing Windows XP Professional Using Attended Installation Slide 6 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneMicroarchitecture-level tuning:Increases the performance of an application by improving the way an a
9、pplication runs on the processor.Can be used with processor-intensive applicationsIf an application is not processor-intensive, then you should first improve processor utilization by using system-level and application-level tuning. Can be achieved by using the sampling feature of VTune Performance A
10、nalyzer.Understanding the Tuning Methodology (Contd.)Installing Windows XP Professional Using Attended Installation Slide 7 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneJust a minuteWhich level of tuning methodology will you use for I/O-intensive application?Which level of
11、tuning methodology will you use for a process-intensive application? Which level of tuning methodology will you use to reduce the execution time of an application?Answer:System-level tuningMicroarchitecture-level tuningApplication-level tuningInstalling Windows XP Professional Using Attended Install
12、ation Slide 8 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneIt is a good practice to start tuning an application at the system-level to avoid any system-level bottlenecks. Once you ensure that the processor utilization is high, then you can focus on removing the application-
13、level bottlenecks followed by microarchitecture-level bottlenecks.If you are not sure about the specific goals, then you should follow the following sequence in order to achieve the best performance of an application in the shortest possible time:System-levelApplication-levelMicroarchitecture-levelT
14、uning Methodology for Specific GoalsInstalling Windows XP Professional Using Attended Installation Slide 9 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneThere are three main strategies to improve the performance of an application. Each strategy affects processor utilization
15、in a different way: Balancing I/O and computationImproving the threading modelImproving the efficiency of computationTuning Methodology for Specific Goals (Contd.)This strategy enables you to speed up the application when the processor utilization is low.In this case, you need to make changes at the
16、 system-level and the application-level.This strategy enables you to:Add multithreading to a single threaded applicationImprove the threading model of a multithreaded applicationIt enables you to make effective use of system resources.In this case, you need to make changes at the application-level.T
17、his strategy enables you to speed up the application by accomplishing the same amount of work using less computations.In this case, you need to make changes at the application-level and microarchitecture-levelInstalling Windows XP Professional Using Attended Installation Slide 10 of 16Ver. 1.0Code O
18、ptimization and Performance Tuning Using Intel VTuneTuning assistant:Helps you to get more insight into the performance issues in an application and identify the hotspots where performance can be improved.Provides you with the possible solutions to remove or avoid a performance issue.Provides tuning
19、 advice for codes, processes, or time ranges that you select in the source, sampling, or counter monitor views.Launching Tuning AssistantInstalling Windows XP Professional Using Attended Installation Slide 11 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneThe different types
20、of advice that tuning assistant can provide are:Sampling-based adviceCounter monitor-based adviceSource-based tuning adviceStatic assembly penaltiesLaunching Tuning Assistant (Contd.)Installing Windows XP Professional Using Attended Installation Slide 12 of 16Ver. 1.0Code Optimization and Performanc
21、e Tuning Using Intel VTuneActivity: Launching the Tuning AssistantProblem Statement:Chris has developed an application in C# that creates a list of natural numbers and displays their sum. However, on execution, the application runs very slowly. To analyze performance of his application, Chris decide
22、s to analyze his application using the counter monitor feature of Intel VTune Performance Analyzer and use Tuning Assistant to identify the performance issues and propose possible solutions for the issues. Help Chris perform the required task.Installing Windows XP Professional Using Attended Install
23、ation Slide 13 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneActivity: Launching the Tuning Assistant (Contd.)SolutionTo analyze counter data and use Tuning Assistant to identify system-related performance issues and propose possible solutions for the issues, you need to per
24、form the following tasks:1.Collect counter monitor data.2.Launch Tuning Assistant.Installing Windows XP Professional Using Attended Installation Slide 14 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneActivity: Launching the Tuning Assistant (Contd.)SolutionThe information th
25、at tuning assistant provides are as follows:InsightRelevance scaleTuning assistant adviceWorkloadInstalling Windows XP Professional Using Attended Installation Slide 15 of 16Ver. 1.0Code Optimization and Performance Tuning Using Intel VTuneIn this session, you learned that: The Tuning Assistant tool
26、 of VTune Performance Analyzer tunes the performance of applications.You can tune the application at the following three levels:System-Level tuningApplication-Level tuningMicroarchitecture-Level tuningIt is a good practice to start tuning an application at the system level instead of microarchitectu
27、re level. Three main strategies to improve the performance of an application are:Balancing I/O and computationImproving the threading modelImproving the efficiency of computationSummaryInstalling Windows XP Professional Using Attended Installation Slide 16 of 16Ver. 1.0Code Optimization and Performa
28、nce Tuning Using Intel VTuneThe tuning assistant helps you to get more insight into the performance issues in an application and identify the hotspots where performance can be improved. The different types of advice that Tuning Assistant can generate are:Sampling-based adviceCounter monitor-based adviceSource-based tuning adviceStatic assembly penaltiesSummary