日期:2014-05-16  浏览次数:20990 次

Apache2+Tomcat性能调整(二)

ab的全称是ApacheBench,是?Apache?附带的一个小工具,专门用于?HTTP Server?benchmark testing,可以同时模拟多个并发请求。

ab.exe位于安装目录 Apache Software Foundation\Apache2.2\bin的下面。

ab -n 1000 -c 1000 http://localhost/test/index.jsp

这个命令的意思是启动?ab?,向?http://localhost/test/index.jsp发送1000个请求(-n 1000)?,并每次发送1000个请求(-c 1000)-----也就是说一次都发过去了



?

?

解决方法:

调整httpdhttpd.conf里的参数,找到#Include conf/extra/httpd-mpm.conf,将其注释去掉,引入mpm_winnt_module来做MPM,将httpd-mpm.confmpm_winnt_module里的参数调整为:

????ThreadsPerChild 1920
????MaxRequestsPerChild 0

????