Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Performance Tuning Chia-heng Tu PAS Lab Summer Workshop 2009 June 30, 2009 1.

Similar presentations


Presentation on theme: "Introduction to Performance Tuning Chia-heng Tu PAS Lab Summer Workshop 2009 June 30, 2009 1."— Presentation transcript:

1 Introduction to Performance Tuning Chia-heng Tu PAS Lab Summer Workshop 2009 June 30, 2009 1

2 Outline  What is Performance Tuning?  Performance Tuning Process  Techniques for Improving Performance 2

3 What is Performance Tuning?  Performance tuning is the improvement of system performance  Performance tuning goals are usually for:  Maximizing throughput [3]  The number of messages processed over a given interval of time (e.g., bits per second)  Minimizing latency [4]  The time delay between initial input and an output clearly discernible to the simulator trainee or simulator subject 3

4 Performance Tuning Process  An iterative process [1] consists of: 1. Establish a baseline A well defined set of performance objectives, test plans, and baseline metrics (numeric values that categorize acceptable behavior) 2. Collect data (performance analysis tools) Measure the performance (capturing metrics) of the system before modification Real platform vs. virtual platform 3. Analyze results Identify performance issues and bottlenecks The part of the system that is critical for improving the performance 4. *Configure Modify that part of the system to remove the bottleneck New hardware and/or software settings/configurations 5. Test and measure Test and measure to verify that your configuration changes have been beneficial 4

5 Techniques for Improving Performance  Performance analysis  Code optimization  Caching strategy  Load balancing  Parallel computing 5

6 Performance Analysis  Its goal is to determine which sections of a program to optimize  Commonly known as profiling  Investigation of a program's behavior using information gathered as the program executes  A profiler is a performance analysis tool  Measuring the behavior of a program as it executes  E.g., the frequency and duration of function calls, and call graphs 6

7 Example Output of Profilers  Source code and corresponding call graph generated by a profiler (trace-based performance analysis) 7 A CB DEF void C(){ ……..; F(); } Void B(){ ……..; D(); E(); ……..; } void A() { B(); C(); } Source codeCall graph “entry of B” “entry of C and exit of B” “exit of C” // Output file -> A ->B ->D <-D ->E <-E <-B ->C ->F <-F <-C <- A Trace file Instrument performance monitoring functions (e.g., printf) before the code is compiled and the functions dump information into trace file at runtime printf(“entry of B”);

8 Code Optimization  It can refer to improving the implementation of a particular algorithm for performing a task  Code tuning  Enhancing performance by rewriting specific portions of a program to run faster  Optimization can occur at:  Design level (algorithms)  Source code level  Compile level  Assembly level  Runtime 8

9 Caching Strategy  The methods used to determine which data is stored in progressively faster storage  Caching is a fundamental method of  Improving performance by retaining frequently used information in high speed memory to reduce access time  Caching is an effective manner of improving performance in situations where the principle of locality of reference [6] applies  The phenomenon of the same value or related storage locations being frequently accessed  E.g., CPU cache, main mem. & disk cache memory 9

10 Load Balancing  A technique to spread work equally in order to get optimal resource utilization, maximize throughput, and minimize response time  E.g., two or more computers, network links, CPU’s, hard drives, or other resources  The balancing service is usually provided by a dedicated program (load balancer), hardware device, or a combination of both 10 client ?

11 Parallel Computing  A form of computation in which many calculations are carried out simultaneously  Large problems can often be divided into smaller ones, which are then solved concurrently  It has become the dominant paradigm in computer architecture  Mainly in the form of multicore processors  As power consumption (and consequently heat generation) by computers has become a concern in recent years  Several forms of parallel computing  bit-level, instruction level, data, and task parallelism bit-levelinstruction leveldatatask parallelism 11

12 References  [1] Ch.8 Smart Client Application Performance, Smart Client Architecture Design Guide, patterns and practices Developer Center, Microsoft MSDNCh.8 Smart Client Application Performance  [2] Performance Tuning. WikipediaPerformance Tuning. Wikipedia  [3] Scalability. WikipediaScalability. Wikipedia  [4] Latency. WikipediaLatency. Wikipedia  [5] System Throughput. IBM z/TPF Information CenterSystem Throughput. IBM z/TPF Information Center  [6] Locality of Reference. WikipediaLocality of Reference. Wikipedia 12


Download ppt "Introduction to Performance Tuning Chia-heng Tu PAS Lab Summer Workshop 2009 June 30, 2009 1."

Similar presentations


Ads by Google