软件调优基础.pptVIP

  • 1
  • 0
  • 约3.86千字
  • 约 25页
  • 2019-08-28 发布于四川
  • 举报
软件调优基础 2004 年2月23日 为什么需要调优? 相同的代码 不同的性能 目标 明确性能调优的主要任务 定义一些重要的性能调优术语 利用Intel工具提供帮助 Agenda Performance Cycle Overview The Performance Cycle When to Start Performance Gains When to Stop Putting it into Perspective Performance Cycle Details Summary 调优循环 When (why) to Start User Requirement? Software Vendor Requirement? Put Performance Requirement into the Requirements Document Performance should be considered at every stage of the product life cycle (Requirements Gathering, Design, and Testing) Exception: Do “code tuning” after the simple/readable non-optimized version of the application exists. 工作 vs. 效果 When to Stop Architecture is at Maximum Efficiency? Be sure you know what this is: Calculate Theoretical Maximum Performance Requirement is satisfied Incrementally do Wide Mesh Optimizations2 until done 调优原则 We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Donald Knuth Agenda Performance Cycle Overview Performance Cycle Details Gather Performance Data Analyze Data and Identify Issues Generate Alternatives to Resolve Issues Implement Enhancements Summary 收集性能数据 Timer Use to get wall clock time Accuracy, Low Overhead Use Intel? VTune? Performance Analyzer Profiler: Gather Information about Code Usage Performance Monitor: Gather Information about System Resource Usage 工作量 A good workload should have these characteristics: measurable reproducible static representative 分析数据得出结论 Baseline Current Performance Examine Hot Spots Identify Bottlenecks Calculate Potential Maximum Performance Examine Hot Spots The Pareto Principle, a.k.a. the 80/20 Rule Concentrate on the vital few vs. the trivial many Hot Spot: 应用或系统中占主要运算量的部分 Generally consists of a Loop For Applications that don’t have hot spots, examine: Memory Layout Exceptions Effective Compiler Usage 额外内容 Big O Utilization, Efficiency, Throughput, Latency Bottlenecks I/O, Memory, CPU MIPS/FLOPS/CPI Concurrency, Parallelism Scalabilit

文档评论(0)

1亿VIP精品文档

相关文档