Tomcat optimized by adjusting the parameters and configuration
1. Deploy a Web project on Tomcat
Place the item under Webapps Tomcat unpacked directory
1.2 modify the database connection parameters
Into the project file to find and modify jdbc.propertise modify their own database connection parameters
1.3 Starting Tomcat 'access to the Web project
2.Jmeter stress testing tool
The Jmeter decompression stress test tool into the bin directory
2.1 Modify language
2.2 Create a new thread group Right Test Plan> Add> Thread> Thread Group
2.3 Create a new HTTP protocol sampler right thread group> Add> Sampler> HTTP request
2.4 Create a new query results, click start test right HTTTP request> Add> listener> and view the results in tabular Aggregate Report
3. Tomcat case without any configuration
The average time of request processing: 6653
Error error rate: 0.00%
Throughput: 142 / S
3.1 Optimization Option One: Disable AJP service modify the server.xml file
test
The average time of request processing: 4930
Error Error Rate: 0.0%
Throughput: 192 / S
After disabling AJP service has improved testing throughput not necessarily accurate measure more than a few times so to
3.2 Optimization Option Two: Start the executor (thread pool)
Test 1: Up to 500 threads, initially 50 to modify the server.xml file
test
The average time of request processing: 4760
Error Error Rate: 0.0%
Throughput: 201 / S
Throughput has improved
Test II: set the maximum number of wait queue
test
A test data compared to the slightly unsatisfactory
Test three: the operating mode that is noi2
test
It can be seen nio2 performance than nio
4. Adjust the JVM optimal parameters
View the logs generated 4.2
4.4 generated the log files to see gceasy.io
Question one:
Question two:
FIG adjusted to reduce the number of times GC
4.6 Setting G1 Garbage Collector
Pause time is reduced