您的位置:首页 > 其它

erlang mochiweb的测试数值

2016-04-05 00:00 501 查看
使用下面脚本压测:

siege -q -c1000 -r100 -lsiege.log -b http://127.0.0.1:8081/hello_world[/code] 
然后mochiweb启动选项:

1使用选项:

{acceptor_pool_size, 200}


压测结果:

$siege -q -c1000 -r100 -lsiege.log -b http://127.0.0.1:8081/hello_world Transactions:                 100000 hits
Availability:                 100.00 %
Elapsed time:                   6.69 secs
Data transferred:               1.24 MB
Response time:                  0.04 secs
Transaction rate:           14947.68 trans/sec
Throughput:                     0.19 MB/sec
Concurrency:                  565.82
Successful transactions:      100000
Failed transactions:               0
Longest transaction:            3.31
Shortest transaction:           0.00


2.使用选项:

{acceptor_pool_size, 20}


输出结果:

$siege -q -c1000 -r100 -lsiege.log -b http://127.0.0.1:8081/hello_world Transactions:                 100000 hits
Availability:                 100.00 %
Elapsed time:                   7.36 secs
Data transferred:               1.24 MB
Response time:                  0.03 secs
Transaction rate:           13586.96 trans/sec
Throughput:                     0.17 MB/sec
Concurrency:                  473.18
Successful transactions:      100000
Failed transactions:               0
Longest transaction:            7.04
Shortest transaction:           0.00


可以看到次数相同,但响应时间是20个连接池的较快,但其他数值是200个连接池的较好。显然,20 - 200间个某个特殊值可能会达到最优,因为这里面的差距没有1个数量级。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: