Performance analysis: 18 tips. Which one do you use?

Source: Internet
Author: User
Tags benchmark

Perform Performance Analysis on the system or program, which helps you analyze and study problems during running or find the root cause of the problem. The analysis without methodological guidance, such as blind head flies, is time-consuming and laborious. This article describes the 18 methodologies used for performance analysis.

Perform Performance Analysis on the system or program, which helps you analyze and study problems during running or find the root cause of the problem. The analysis without methodological guidance, such as blind head flies, is time-consuming and laborious. To ensure that the software meets or exceeds the design expectations, it is necessary to analyze the performance of the application to discover potential problems. An essential part of performance analysis is to make the application components visible. When you understand how components interact, You can diagnose potential performance problems.

Mainly used methodology, including: Use method: Find the resource bottleneck; TSA method: Analysis Program time; off-CPU analysis: analysis of any type of thread delay; http://www.brendangregg.com/activebenchmarking.htmlActive benchmarking (Dynamic benchmark) for accurate and effective benchmark analysis.

 

The following is a summary of some objections that I do not suggest.

1. deny others (opposed)

 

  • Try to find a system or environment component, but it has nothing to do with you.
  • Suppose the problem lies in this component.
  • Push the problem to the team that is really related to the component.
  • If you find that it is not related to the team, redo the first step and continue to seek help from others.
2. Guiding Light (opposed)

 

 

  • You can use either of the following methods to select a simple tool: you are familiar with it, you are looking for it on the Internet, and you are randomly looking for it.
  • Run the tool.
  • Identify prominent issues.

 

3. Bad practices)

Change things randomly until the problem leaves.

4. Random changes (incorrect practices)

 

  1. Measure a performance baseline.
  2. Randomly locate and change a property.
  3. Perform the change operation in a certain direction.
  4. Measure System Performance.
  5. Change the direction to continue the change.
  6. Measure System Performance.
  7. Is the result of step 4 or 6 better than that of baseline? If yes, continue; otherwise, perform rollback.
  8. Return to step 1.

 

5. Passive benchmarks (incorrect practices)

 

  • Select a benchmark tool.
  • Run the tool with different options.
  • Make a slide based on the results.
  • Manage by slides.

 

6. Temporary check list method

Run a. If B appears, run C.

7. Problem Statement Method

 

  • What makes you think there is a performance problem?
  • Is the system operating well before?
  • What changes have been implemented recently (such as software, hardware, and load )?
  • Is it a problem of performance degradation in terms of latency or running time?
  • Will this problem affect other people or programs (or just yourself )?
  • What is the running environment? What software or hardware is used? Version? Configuration?
8. System Method

 

 

  • Problem
  • Hypothesis
  • Prediction
  • Test
  • Analysis

 

9. Workload feature description method

 

  • Who is causing workload? PID, uid, and IP address.
  • Why is there a workload? Code path
  • What is the workload? Iops, tput command, Type
  • How does the load change over time?

 

10. Top-Down Analysis

 

  • Starting from the highest level
  • Check details of the next level
  • Find the most important part for decomposition
  • If the problem persists, redo step 1.

 

11. layer-by-layer analysis

Measure latency from the following aspects:

 

  • Multiple Languages
  • Execution File
  • Runtime Library
  • System Call
  • Core: file system, network
  • Device Driver

 

12. latency analysis

 

  • Measure running time (Delay)
  • Divided into logical parts for synchronization
  • Continue to divide until the root cause of latency is identified.
  • Quantification: estimate the speed improvement after the system recovers

 

13. Tool Method

 

  • List available performance analysis tools
  • List useful indicators based on the characteristics of each tool
  • Provide explanations for each indicator
  • Run the selected tool to analyze the selected indicators

 

14. Use Method

Check each resource as follows:

 

  • Utilization (utilization)
  • Saturation)
  • Error (errors)

 

15. Stack configuration method

 

  • Trace thread stack information and analyze on-CPU and off-CPU
  • Joint Analysis
  • Analyze stack Inversion

 

16. Off-CPU Analysis

 

  • Analyze off-CPU time for each scheduled thread in the stack
  • Perform joint analysis on similar stacks
  • Analyze the longest and shortest time

 

17. TSA Method

1. measure the time of the operating system thread status for each thread that has attracted attention. For example:

 

  • Execution time
  • Running time
  • Exchange Time
  • Sleep Time
  • Lock time
  • Idle Time

 

2. Use appropriate tools to analyze the highest and lowest occurrence frequency events.

18. Dynamic benchmarking

 

  • Run the measurement benchmark with a long enough cycle.
  • When running, use other tools for performance analysis to find out the limiting factors.

Performance analysis: 18 tips. Which one do you use?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.