freebsd下apache的worker/prefork模式性能的简单对比
来源:互联网 发布:iphone 投屏 mac air 编辑:程序博客网 时间:2024/06/06 13:15
worker/prefork是在apache中使用最多的模型。worker为多进程多线程形式,prefork为多进程形式。worker/prefork的在特定的环境和应用下都有其自身的优缺点,无法在模糊的环境下对起进行比较。
在freebsd 6.2;apache 2.2.3;双CPU的机器;2G内存的情况下;应用于网站服务下进行测试
prefork一般调整性能的参数有:StartServers、MinSpareServers 、MaxSpareServers 、MaxClients。
worker一般调整性能的参数有:tartServers、MaxClients、ServerLimit、MinSpareThreads 、MaxSpareThreads 、ThreadsPerChild,建议要求MaxClients为ThreadsPerChild整数倍,否则服务启动的时候会有警告。
有如下2条测试命令:
1)ab -n SUM -c CUR http://127.0.0.1:80/see.php (see.php内容很简单,只有:<?php?>)
2)ab -n SUM -c CUR http://127.0.0.1:80/ (SUM 为总请求数,CUR为并发数)
测试结果:
1)worker模式下随ThreadsPerChild值减少,性能有了较大的提升,到最后基本稳定。(进程内线程过多的时候,线程调度时间会大大的增加)
2)当CUR 只在百档位的时候,prefork性能对请求的处理要明显高于worker。
3)prefork对调用php的影响比worker模式要大。(线程资源共享优势)
4)prefork要比worker有更强健的稳定性,特别是CUR 为上K档位时,worker表现的很不好,特别是处理请求简单请求的时候。
5)worker模式下,如果支持SSL则性能也有明显的下降,同时会降低稳定性。
- freebsd下apache的worker/prefork模式性能的简单对比
- Apache Prefork和Worker模式的性能比较测试
- Apache Prefork和Worker模式的性能比较测试
- Apache Prefork和Worker模式的性能比较测试
- Apache Prefork和Worker模式的性能比较测试
- Apache Prefork和Worker模式的性能比较测试
- Apache的工作模式prefork & worker简单分析
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- Apache的prefork模式和worker模式
- ActiveX 控件文件名的说明帮助
- 海上运输业:迎来黄金发展时期
- 每天学一点flash(54)输入文本显示光标
- 七个心理寓言
- HDC,CDC,CWindowDC,CClientDC,CPaintDC基础
- freebsd下apache的worker/prefork模式性能的简单对比
- TL 中 USES_CONVERSION 的具体功能
- 看懂Gradle脚本
- Makefile学习教程: 跟我一起写 Makefile
- C#字符串操作实例
- 40种Lightbox特效
- tcflush与unbuffered I/O,buffered I/O
- Linux下触控板的禁用
- PHP5.3中新增的魔术常量__DIR__