-
Notifications
You must be signed in to change notification settings - Fork 2
Web服务器性能测试对比
Iflei edited this page Aug 19, 2017
·
1 revision
测试工具:http_load 测试环境:centos 7.3 虚拟机、intel core i7 四核
- 测试协程数 进程数:8 并发量600 时间30s
协程数 | 25 | 40 | 50 | 60 | 80 | 100 |
---|---|---|---|---|---|---|
每秒响应请求数(fetche/s) | 13001 | 19377 | 19822 | 19524 | 19232.1 | 19286 |
- 测进程数 协程数:50 并发:600 时间:30s
进程数 | 4 | 8 | 16 | 32 | 48 | 64 | 80 |
---|---|---|---|---|---|---|---|
每秒响应请求数(fetche/s) | 18180.2 | 19822 | 25449.6 | 27864.4 | 27653.3 | 27927.6 | 26870.2 |
结论:最优状态:协程数:50,进程数:32,每秒响应请求:大约2.7w。
统计数据为:每秒响应请求数
并发量 | 300 | 400 | 500 | 600 | 700 | 800 | 平均值 |
---|---|---|---|---|---|---|---|
多线程 | 14276.9 | 14173.2 | 13515 | 13304.7 | 13027.9 | 12774.5 | 13512 |
线程池 | 22182.7 | 19675 | 17642.4 | 16955 | 17874 | 14216.6 | 18090 |
Apache | 19971.5 | 19796.6 | 20188.2 | 19946.1 | 19931.4 | 19901.2 | 19955 |
libco | 27603.7 | 27254.1 | 27365.4 | 27290.7 | 27723.1 | 26900 | 27355 |
Nginx | 31128.6 | 30261 | 29175.6 | 30144 | 30063.2 | 29692 | 30077 |
结论:nginx平均每秒响应次数为3w,libco版web服务器为2.73w,差距每秒2.7k,其他版本与libco版仍有一定差距。