Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat performance tuning

I am tuning the performance of Tomcat 7, the server is equipped with 24 cores and 32 GB memory, my testing interface is a RESTful service without any process(response immediately) and the configuration of server.xml is as following...

<Connector port="8088" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443"
           enableLookups="false"
           compression="off"
           maxConnections="8192"
           maxThreads="1000"
           tcpNoDelay="true"/>

and the JVM configuration...

-Xms8192M -Xmx16384M.

The host of JMeter is another computer has same specification with above server. And the configuration of JMeter heap is -Xms12218m -Xmx24426m.

My JMeter test plan is 240 requests send to the RESTful interface concurrently for once, but I have noticed that, the average of response time for the first 100 is no more than 50ms but it increases to 1 sec in the next 100 and to 3 sec for the rest.

I am curious about such phenomenon, is there any mistakes in the configurations or any suggestions?

Thanks in advance.

like image 316
JiaMing Lin Avatar asked Nov 03 '14 03:11

JiaMing Lin


1 Answers

You can config:

acceptCount="2048"

and

maxConnections="1024"

The maxConnections has relationship with maxThreads, and you should configure the maxThreads match your business and CPU's core number, such as 8X, or 16X. the acceptCount is the waiting connection number.

Note that the maxConnections and maxThreads is not the bigger the better, with the performance of your Server Hardware.

like image 188
TiemaoCSDN Avatar answered Oct 12 '22 12:10

TiemaoCSDN