Anatomy from 4 Dimensions: Factors that affect Java performance

Source: Internet
Author: User

With the rapid development of the Internet industry, now the Web interface design has become more and more cool. Admittedly, the impact of the visual on our website traffic will play a big role. However, if the back-end service does not meet the burst concurrency, the user experience becomes very poor.

As we all know, it is not easy to make a website. Java is now one of the most commonly used programming languages for developers, and many enterprise-class IT companies rely heavily on Java. There are too many websites that are hard to hear because of the performance problems of Java, but this is an indisputable fact. So the question is, what causes these performance problems? How can you quickly discover the root cause of performance problems?

For Java developers, OneAPM's application Insight is a must-have Java Performance Optimization tool that can be "1 from 4 of dimensions. Web transaction; 2. Database; 3. External services; 4. Background tasks "to dissect the application's every move during the run-up to the system. For example, when the user accesses the application, each step of the operation will give you a clear, time-consuming, how much resources, and provide historical data for you to do reference comparison, so that you can see the operation of the application at a glance, clearly.

Generally speaking, we have two steps to manage performance: 1. Performance problems found; 2. Performance problem optimization. Application Insight is the first to find the root cause of performance problems, the next performance optimization process will become very simple. OneAPM can also pinpoint the root cause of performance problems from multiple dimensions and provide a final solution. :

We can clearly see the response time consumption of 4 dimensions "web transactions, databases, external services, background tasks in the overview view of the response time, and then we can analyze the time consuming situation in depth for each dimension.

1. Web Transactions

We can see the response time ratio, average response time, performance index, throughput, and so on for slow web transactions from the view, and the Web transactions are sorted by time-consuming, in a list, so you can easily find out which Web transactions take longer to execute, And you can see the TOP5 Web Thing response Time line chart provided.

Then, based on the performance index data that provides the WEB transaction, we can initially judge the user's experience during the operation. In the end, when the WEB transaction is executing, the time is spent somewhere. More importantly, application Insight also provides a slow transaction tracking feature, click on the name in the slow transaction tracking list to view details such as:

This data view shows the "Summary, details, parameters, and details of the sql"4 indicators of the slow transaction tracked, and by clicking on the details of this indicator, the entire WEB transaction component's invocation relationship and the overall time-consuming situation of each step will be directly present to you, We can also see the call relationships for each step of the business, and display them in a tree-structured way, while you can expand the method tracking feature to find more time-consuming lines of code, including HTTP requests that can be seen clearly. Throughout the execution of the WEB transaction, we present the profiling results as a view of the execution of each piece of code, as well as the usage of the resources it occupies.

2. Database

From the view of the database, we will sort the database operations in the form of Table Name and SQL operation type, according to the length of response time, to display the long-time data as a list, and to see the average response time per database operation, total response time, and throughput situation, This allows you to find out the dimensions of the excluded Web transaction, and what is more time-consuming SQL to take a look at. OneAPM also provides a view of the TOP 5 database operation response time, as shown in:

With these chart data, we can dynamically see the overall situation of application performance consumption per database operation. In addition, we also provide slow SQL tracking for slow database operations,

From this list of views, we can see the timestamp of slow SQL and the time-consuming situation. You can also click on the name of slow SQL to continue to track the details of this SQL, such as:

Here, we can see the detailed SQL statements and the number and scope of their execution, and with this data provided by slow SQL tracing, it is very easy to find the SQL slow cause. Of course, because these SQL are related to the business building, it is easy to determine whether the problem is a program or operation. If it is a program problem, OneAPM provides the WEB transaction for this operation, and if it is an operational issue, it also provides a slow SQL tracing feature. In general, we can optimize our application according to the cause of the problem, so the efficiency will certainly be greatly improved.

3. External Services

With this chart, we can see the average response time, throughput of third-party services called through WebService, Rest, and so on, as well as the time it takes to invoke the interface, and each external service invocation provides a view of the data, as shown in:

Response time and throughput graph: Shows the response time and throughput changes for this external service

Caller time ratio graph: Shows the transaction execution time that the external service was invoked

Transaction list: Shows the percentage of transaction execution time, response time, and number of calls to the external service

From the above data, we can conclude that, in terms of performance consumption, the time-consuming is mainly in the method invocation aspect, or occurs in the interface. With these performance data, we can quickly navigate to the root cause of the application's performance problems, and it will be easier to solve the problem.

4. Background tasks

From the view of the background task, we can see the time-consuming tasks in the application, including average response times per task, performance index, throughput, response time ratio, and so on. Then, in this dimension of the background task, we can find more time-consuming execution tasks and provide a dynamic line view of the corresponding TOP 5 background task response time, throughput, CPU usage, and so on.

From here, we can find out the non-HTTP request method for a large number of system performance bottlenecks, and then according to the background task provides a Top 5 response view, you can visually see the severe performance of the background tasks and CPU usage and memory usage.

Through the analysis of the performance consumption of the background task, we can also find out the more serious consuming resources of the scheduled task, the time-consuming task to optimize, then the application will become more smooth.

Comprehensively speaking,

By deep analysis of the 4 dimensions of "web transactions, databases, external services, and background tasks, it is easy to find the reasons that affect the slowness of the Java system. After discovering these reasons, we go to the system optimization, the whole process of processing the problem will become much simpler.

If you are very concerned about the system performance consumption in which dimension, or is now your application has experienced serious performance problems, but also slow to find the reason, then hurriedly register a OneAPM account, install application Insight to feel it! Whether you are doing operations, development or testing, we believe that the use of application Insight will surely bring surprises and rewards to your work.

Transfer from http://news.oneapm.com/oneapm-java/

Anatomy from 4 Dimensions: Factors that affect Java performance

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.