企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
压力测试 24_3+31 ~~~ # ab -n 100 -c 10 a.org/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 a.org (be patient).....done Server Software: Apache/2.4.20 # 服务器软件类型和版本 Server Hostname: a.org # 主机名 Server Port: 80 # 端口 Document Path: /index.php # 请求文件 Document Length: 50563 bytes # 文件大小 Concurrency Level: 10 # 并发数 Time taken for tests: 0.684 seconds # 完成时间 Complete requests: 100 # 完成数量 Failed requests: 8 # 失败数量 (Connect: 0, Receive: 0, Length: 8, Exceptions: 0) Write errors: 0 Total transferred: 5072991 bytes # 总共传输的报文大小,包括tcp/ip和httpd报文 HTML transferred: 5056291 bytes # 网页文件大小 Requests per second: 146.26 [#/sec] (mean) # 每分钟处理的请求数量 Time per request: 68.372 [ms] (mean) # 所有请求的平均时间(10个),平均到并发数 Time per request: 6.837 [ms] (mean, across all concurrent requests)# 平均每个请求的时间 Transfer rate: 7245.82 [Kbytes/sec] received # 传输速率 Connection Times (ms) min mean[+/-sd] median max Connect: 0 1 0.7 1 3 Processing: 7 66 105.8 31 403 Waiting: 4 56 102.4 23 401 Total: 8 67 105.7 33 403 Percentage of the requests served within a certain time (ms) 50% 33 66% 40 75% 48 80% 52 90% 355 95% 381 98% 393 99% 403 100% 403 (longest request) ~~~ linux限制了每个进程最多打开1024个文件,可以修改 ~~~ # ulimit -n ~~~ >[info] 测试注意事项 1 不要只看数字,使用浏览器,网页是否能正常打开 2 大规模并发后,服务器需要好久才能恢复正常