Tomcat performance adjustment (6)

xiaoxiao2021-03-13  183

4. Tomcat capacity plan

The steps to do a capacity plan for Tomcat:

1) Quantify the load. If the site has been established and run, you can use the tools described earlier to imitate user access and determine the demand for resources.

2) Analysis of test results or testing. It is necessary to know that those requests have caused significant loads or use too much resources, and compare with other requests, which determines the bottleneck of the system. For example, if the servlet consumes a long time to query the database, then you need to consider using the buffer pool to reduce the response time.

3) Determine the minimum performance of performance. For example, you don't want users to spend 20 seconds to wait for the return of the result page, that is, when the limit is reached, the user waitsible time cannot exceed 20 seconds (from the click chain to see the first one. data). This time contains database query time and file access time. similar

Product performance may have different standards in different companies, and it is generally best to take the minimum standard in peers or to evaluate this standard.

4) Determine how to use the underlying resource reasonably and test one by one. Bottom resources include CPU, memory, memory, bandwidth,

Operating system, JVM, etc. During the various production environments, deploy and test in sequence, and observe whether it meets the needs. Try to use several JVM when testing Tomcat, and adjust the JVM to test the size of the memory and Tomcat thread pool. At the same time, in order to achieve the effect of sufficiently reasonably and stably use, the hardware system bottlenecks in the test process determine the reasonable resource allocation. This process is the most complicated, and generally because there is no reference value, it can only be summarized by theoretical inference and experience.

5) If the optimal combination can be reached by repeated testing of step 4, the product can be deployed in the same production environment.

In addition, keep in mind that you must document your testing process and results, because it may also be tested so that you can use the previous test results as a reference. In addition, the test process is repeated multiple times, and each time the conditions may be different, so only the results of the results and the best conditions can be made.

In this way, we have found the best combination through testing, and various resources have been reasonably configured, and the performance of the system has greatly improved.

Six. Additional information

It is clear that this article is also difficult to fully explain the performance optimization process. If you do more research, you may make performance tuning better, such as the performance adjustment of the Java program, operating system adjustment, various complex environments and applications and all other things related to applications. The links mentioned herein are provided herein, and the links mentioned herein, and some reference materials herein.

1. Web Performance Test Information and Tools

1) JMeter Wiki Home, JMeter is an open source 100% Java performance test tool

http://wiki.apache.org/jakarta-jmeter/

2) APACHE BENCHMARK instructions

http://httpd.apache.org/docs-2.0/programs/ab.html

3) Some Java related test tools include tools that can be tested with Tomcat integration

http://blog.9cbs.neet/wyingquan/

4) LoadRunner® is an industrial standard-level load test tool for predicting system behavior and performance. It implements the entire enterprise architecture by simulating data by Million users to test the entire enterprise architecture to help you find and find problems faster.

Http://www.mercury.com/us/products/performance-center/loadrunner/

2. Introduction of related content introduced in the text

1) Apache 2.x Tomcat 4.x Make load balancing, describes how to use JK to configure the load balancing of the cluster.

http://raibledesigns.com/tomcat/index.html2) The formulation of the capacity plan has collected many examples of developing a Web site capacity program:

http://www.capacityPlanning.com/

3) Evaluation Tomcat5 load balance and cluster,

http://www.javaresearch.org/Article/showArticle.jsp?column=556&thread=19777

4) Integration and integration of Apache and Tomcat

http://www.javaresearch.org/Article/showArticle.jsp?column=23&thread=18139

5) Research on performance test tools, introduced the principles and ideas of performance test tools

http://www.51testing.com/emagzine/no2_2.htm

6) Java's memory leak

http://www.matrix.org.cn/resource/Article/409.html

7) What is the difference between web servers and application servers?

http://www.matrix.org.cn/resource/Article/1429.html

8) Detailed explanation of database clusters in performance

http://www.theserverside.com/articles/article.tss?l=db_break

转载请注明原文地址:https://www.9cbs.com/read-129001.html

New Post(0)