http://wangxuliangboy.javaeye.com/blog/235081
如何在WINDOW下配置TOMCAT APR:
?
APR是什么呢,( Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. )
Windows下的安裝配置與使用
1、先去 http://tomcat.heanet.ie/native/ 下載編譯好的 tcnative-1.dll 文件
2、把tcnative-1.dll文件放在Tomcat的bin目錄下
然后啟動(dòng)TOMCAT,如果看到以下信息:
2008-8-31 17:28:59 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2008-8-31 17:28:59 org.apache.coyote.ajp.AjpAprProtocol start]則配置成功
?
然后你可以用APACHE的AB命令測(cè)試下效果.
? ab -n 1000 -c 300 http://localhost:8080/turbine/index.jsp
?
相關(guān)APR的參數(shù)配置可以參考以下文檔:
???????? http://tomcat.apache.org/tomcat-5.5-doc/apr.html
?
?
?
?
如何查看TOMCAT的并發(fā)訪問(wèn)量:
? 我們進(jìn)入TOMCAT服務(wù)管理頁(yè)面( http://localhost:8080/manager/status ),可以看到下面這段文字
http-8080
Max threads: 1000 Min spare threads: 0 Max spare threads: 0 Current thread count: 303 Current thread busy: 234 Keeped alive sockets count: 0
Max processing time: 23531 ms Processing time: 29287.717 s Request count: 2980 Error count: 0 Bytes received: 0.00 MB Bytes sent: 12.61 MB
?
Current thread count: 303? 這個(gè)參數(shù)則代表當(dāng)前TOMCAT的并發(fā)訪問(wèn)量
?
?
?
這是我TOMCAT服務(wù)器的配置:
?<Connector port="8080" maxHttpHeaderSize="8192" pollerSize="10025"
?????????????? maxThreads="1000" minSpareThreads="25" maxSpareThreads="75"
?????????????? enableLookups="false" redirectPort="8443" acceptCount="100"
????? compression="on" compressionMinSize="2048"???
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"?
?????????????? connectionTimeout="20000" disableUploadTimeout="true" sendfileSize="2048" />
?
?
將TOMCAT日志更改為L(zhǎng)OG4J日志輸出
?? 把commons-logging.jar,log4j-1.2.13.jar的兩個(gè)JAR拷貝到tomcat_home/common/lib下面.
? 然后在將log4j.properties拷貝到tomcat_home/common/classes下面
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元
