压力测试总结

(1) 从Tomcat5.0升到Tomcat6.0


(2) Tomcat线程池 server.xml中


<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" 
 maxThreads="1000" minSpareThreads="100" />


    <Connector executor="tomcatThreadPool" port="58082" protocol="HTTP/1.1" 
               connectionTimeout="10000" enableLookups="false"
  maxThreads="1000" acceptCount="1000" maxKeepAliveRequests="1"
               redirectPort="8443" />
(3) 数据库连接池 %TOMCAT_HOME%\conf\catalina\localhost\map3.html中


<Context workDir="E:/zjygj/map3/work" docBase="E:/zjygj/map3" reloaded="true">
<Resource name="jdbc/oracle" auth="Container"  
 type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver"  
 url="jdbc:oracle:thin:@1.1.1.3:1521:ORCL"  
 username="tms66" password="tms66" maxActive="500" maxIdle="400"  
 maxWait="5000"/>
</Context>
core.properties中


server.db.oracle.conntype=jndi
server.db.oracle.jndi=jdbc/oracle
web.xml中


<resource-ref>
<res-ref-name>jdbc/oracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>


设置oracle最大连接数


(4) Apache 负载均衡 httpd.conf


(5) 关闭日志 log4j.properties


(6) 更新map-mid.jar


(7) 删除不必要的filter web.xml中


(8) javaw.exe 启动tomcat


"javaw.exe" -client -Xms1024m -Xmx1536m -jar bootstrap.jar -Djava.awt.headless=true -Dcatalina.home=E:\zjygj\apache-tomcat-6.0.20\ -Djava.io.tmpdir=E:\zjygj\apache-tomcat-6.0.20\temp start

你可能感兴趣的:(压力测试总结)