[Turn] tomcat performance tuning

http://www.cnblogs.com/kreo/p/4434802.html

 

http://love-love-l.blog.163.com/blog/static/21078304201311564236996/

 

 

There are 3 operating modes of tomcat. Modify their operating modes. Whether the operation of the 3 modes is successful, you can see his startup console or startup log. Or log in to their default page http://localhost:8080/ to view them server status. 

1)bio 

The default mode, the performance is very low, without any optimization processing and support. 

2)nio 

Use java's asynchronous IO care technology, no blocking IO technology. 

If you want to run in this mode, directly modify the Connector node in server.xml, and modify the protocol to 

<Connector port="80" protocol="org.apache.coyote.http11.Http11NioProtocol"
	connectionTimeout="20000"
	URIEncoding="UTF-8"
	useBodyEncodingForURI="true"
	enableLookups="false"
	redirectPort="8443" />

After startup, it will take effect. 

3)apr 

It is the most difficult to install, but it solves the asynchronous IO problem from the operating system level and greatly improves the performance. 

Apr and native must be installed, and apr is supported by direct startup. The following modifications are purely redundant, only for everyone to expand their knowledge, but still need to install apr and native 

If nio modifies the mode, modify the protocol to org.apache.coyote.http11.Http11AprProtocol

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326961522&siteId=291194637