Top 10 problems affecting Java EE Performance

Source: Internet
Author: User

The author of this article is a senior System Architect with more than 10 years of experience. His major areas of expertise are Java EE, middleware and JVM technology. He also has profound insights on performance optimization and improvement. Next he will share with you 10 common problems that affect Java EE performance.

1. Lack of proper capacity planning

Capacity planning is a comprehensive and evolving process standard that predicts current and future IT environment capacity requirements. Reasonable capacity planning not only ensures and tracks the current IT production capacity and stability, but also ensures that new projects are deployed to the existing production environment with minimum risks. Hardware, middleware, JVM, and adjustment should be prepared before project deployment.

2. Insufficient Java EE middleware environment specifications

"No rules, not a square ". The second common reason is that the Java EE middleware or infrastructure is not standard. At the beginning of the project, there were no reasonable specifications on the new platform, resulting in poor system stability. This will increase customer costs, so it is necessary to take time to develop reasonable Java EE middleware environment specifications. This work should be combined with the initial capacity planning iteration.

3. Excessive garbage collection on java virtual machines

Are you familiar with the error message "java. lang. OutOfMemoryError? JVM memory space overconsumes Java heap and local heap.

Garbage collection is not necessarily represented as an OOM condition, excessive garbage collection can be understood as the long JVM pause time and performance degradation caused by minor or excessive collection of data by jvm gc threads in a short time. There may be the following reasons:

Suggestion:

4. Too many or too few integration with external systems

The fourth cause of poor Java EE performance is the high distributed system. A typical case is the telecom IT environment. In this environment, a middleware field, such as service bus, rarely does all the work. Instead, it only "delegates" some businesses to other parts, such as product quality, customer Data and order management are applied to other Java EE middleware platforms or legacy systems, such as mainframes supporting various load types and communication protocols.

Such an external system call means that the client's Java EE application triggers the creation or reuse of socket links to read and write data from the external system. You can configure synchronous or asynchronous calls Based on the implementation and implementation of business processes. It should be noted that the response time will change according to the stability of the external system, so it is very important to protect Java EE applications and middleware through appropriate timeout.

The following three situations are frequently related to problems and performance degradation:

Finally, we recommend that you perform more negative tests, which means that you need to create conditions for these problems to test how the application and middleware handle external system errors.

5. Lack of proper database SQL optimization and capacity planning

Everyone may be surprised at this: Database problems. Most Java EE Enterprise systems rely on relational databases to process complex business processes. A solid and solid database environment ensures the growth of the IT environment to support growing businesses.

In practice, database-related performance problems are very common. Because most database transactions are executed by JDBC data sources, including relational persistence APIs, such as Hibernate ). Performance problems are initially manifested as thread blocking.

The following are some of the database-related issues that I have encountered during my 10 years of work. The Oracle database is used as an example ):

Suggestion:

6. Specific application performance problems

The following are serious Java EE application problems. The performance of specific applications is summarized as follows:

7. Java EE middleware Optimization

Generally, Java EE middleware is enough, but it lacks necessary optimization. Most Java EE containers have a variety of solutions for your applications and business processes.

If appropriate adjustments and practices are not made, the Java EE container may be in a negative state. Is a view and Check List Example:

8. Insufficient active monitoring

Lack of monitoring will not cause actual performance problems, but it will affect your understanding of the performance and health status of the Java EE platform. In the end, this environment can reach a break point, which may expose some defects and problems (JVM Memory leakage, and so on ).

In my experience, if you do not start monitoring, but run it for a few months or a few years, the stability of the platform will be greatly reduced.

That is to say, it will never be too late to improve the existing environment. The following are some suggestions:

 

9. Hardware saturation of public infrastructure

This problem is often seen when too many Java EE middleware environments are deployed to the existing hardware with the JVM process. Too many JVM processes are a real performance killer for a limited physical CPU core. In addition, as the client business grows, the hardware needs to be considered again.

10. network latency

The last problem that affects performance is the network, which may occur from time to time, such as the failure of routers, switches, and DNS servers. IT is more common to have regular or intermittent latency in a highly dispersed IT environment. The example in the following figure shows the latency between a Weblogic cluster communication in the same region and an Oracle database server.

Intermittent or regular latency can trigger important performance issues and affect Java EE applications in different ways.

JDBC row data "prefetch", XML data compression, and data cache can reduce network latency. When designing a new network topology, you should carefully check this network latency problem.

I hope this article will help you understand some common performance problems and stress points. Each IT environment is unique, so the problems mentioned in this article may not be what you encounter, you can share your problems with us!

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.