Common Causes of performance problems

Source: Internet
Author: User
Tags high cpu usage

The following lists some common causes of performance problems.

  • Hardware becomes a performance bottleneck due to heavy program load.
  • It is observed that the CPU usage is always high, and the response time increases with the load. when the load drops, the performance returns to normal again. if the load does exceed the capacity of the program, the solution is to upgrade the hardware, or increase the server node, and share the load with the Server Load balancer to multiple points.
  • The database cannot return query results in a timely manner, and the request cannot be completed in a timely manner.
  • The CPU usage on the application server is normal. Check dump to find that the working threads are waiting for database requests. the solution is to transfer the monitoring focus from the application server to the database server and check why database requests cannot be returned in a timely manner. it may be because the database is busy or has a deadlock.
  • A deadlock occurs due to code reasons.
  • Although the CPU usage is 0, requests are always not returned. The solution is to check the status of each thread in the process through the dump file to find the cause of blocking.
  • An endless loop occurs due to code reasons.

An important indicator for distinguishing performance problems is the CPU utilization.

  • When there is a performance problem and the CPU utilization is low, there is often a deadlock or waiting for some resources, such as data or network. The solution is to check what each thread is waiting?
  • When the performance is poor and the CPU usage is high, check the load. if the load is normal, the high CPU is often caused by program design problems. the solution is to check the cause of CPU busy.

Summary Form

CPU usage \ Load Low Normal High
Low Resource contention, resources occupied by threads for a long time, resulting in all worker threads waiting, resulting in low CPU usage.    
Normal   All are normal, but the response time is always a little slower than the response time in the design, so it is likely that the optimization in a certain detail is not enough. if regular expressions are not frequently used in the code, and the efficiency of regular expressions cannot achieve the expected results, the overall performance will decrease. this type of problem is difficult to solve. It is often necessary to analyze the log file to determine which details are slow. an effective profiler program can always get twice the result with half the effort.

All are normal. Check that the working thread is waiting for the return of database requests. Check the performance of the database server to see if the database is too busy or has a database deadlock.

 
High Resource contention: resources are only available for a short period of time. The system takes a lot of CPU time for thread switching and scheduling, resulting in high CPU usage and frequent fluctuations The solution is to use the dump file to check what code is executed by high CPU and whether the Code cannot end in a loop body. If the performance returns to normal when the load drops, it means that the load exceeds the capacity of the program hardware system. The solution is to upgrade the hardware or add the server node of the Server Load balancer.

 

From <efficient troubleshooting of Windows user-State Programs>

The table is an original summary type.

Related Article

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.