免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1205 | 回复: 0

apache perfork和worker模式测试对比 [复制链接]

论坛徽章:
0
发表于 2011-12-22 08:54 |显示全部楼层
http://blog.sina.com.cn/s/blog_4a082e2f0100dvi9.html
 
利用Apache自带的测试工具ab对Server进行测试的情况(设定请求的index页面为6bytes),cpu%为cpu占用率,mem为内存使用量(M为单位),RequestsPerSecond为每秒处理的请求数。
1、Prefor方式
(ServerLimit,StartServer,MinSpareServers,MaxSpareServers,MaxClients,MaxRequestPerChild)

-n/-c(ab参数) Cpu% Mem
Requestspersecond
(-,5,5,10,150,0)
100000/100 28.8 285 8434
100000/200 29.2 304 8032
100000/500 25.3 323 7348
100000/1000 24.4 330 5886
(10000,5,5,10,500,0)
100000/100 28.7 371 8345
100000/200 27.4 389 7929
100000/500 24.9 417 7229
100000/1000 23.4 437 6676
(10000,5,5,10,1000,0)
100000/100 28.8 408 8517
100000/200 27.0 422 8045
100000/500 24.2 455 7236
100000/1000 22.5 470 6570
(10000,5,5,10,1500,0)
100000/100 29.6 330 8407
100000/200 28.1 349 8014
100000/500 26.4 380 7290
100000/1000 24.0 400 6686
2、Worker方式
(ServerLimt,Threadlimt,Startservers,MaxClients,MinspareThread,MaxspareThread,ThreadperChild,MaxRequestPerChild)

-n/-c(ab参数) cpu% mem RequestsperSecond
(50,500,5,10000,50,200,200,0)
100000/100 18.6 188 6020
100000/200 20.1 195 5892
100000/500 19.8 209 5708
100000/1000 22.2 218 6081
(100,500,5,10000,50,200,100,0)
100000/100 24.5 240 6919
100000/200 23.6 247 6798
100000/500 24.6 254 6827
100000/1000 22.3 271 6114
(200,500,5,10000,50,200,50,0)
100000/100 27.3 301 7781
100000/200 27.4 307 7789
100000/500 26.0 320 7141
100000/1000 21.8 344 6110
相对来说,prefork方式速度要稍高于worker,然而它需要的cpu和memory资源也稍多于woker。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP