模拟1000个请求,600个并发,加上-r参数可防止出现:apr_socket_recv "connection reset by peer" 错误
# ab -r -n 1000 -c 600 http://192.168.15.55/test/big/index.php
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.15.55 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: Apache/2.4.10
Server Hostname: 192.168.15.55
Server Port: 80
Document Path: /test/big/index.php
Document Length: 0 bytes
Concurrency Level: 600
Time taken for tests: 0.612 seconds
Complete requests: 1000
Failed requests: 1645
(Connect:

本文介绍了如何使用ApacheBench工具进行压力测试,以`ab -r -n 1000 -c 600 http://192.168.15.55/test/big/index.php`为例,分析了测试结果,包括服务器信息、并发级别、响应时间、吞吐率等关键指标,帮助理解Web服务器的性能表现。

551

被折叠的 条评论
为什么被折叠?



