日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > Nginx >内容正文

Nginx

Nginx ab压力测试

發(fā)布時間:2023/12/18 Nginx 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Nginx ab压力测试 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

20-ab壓力測試及nginx性能統(tǒng)計模塊

優(yōu)化的啟發(fā),打開的文件太多?

Nginx 錯誤日志顯示,打開文件數(shù)太多

?

?

?

?

系統(tǒng)層面

more /proc/sys/net/core/somaxconn

?

單個Nginx 測試index.html

沒優(yōu)化前

[root@/home/www]#ab -c 4000 -n 100000 http://test.demo.com/index.html Concurrency Level: 4000 Time taken for tests: 18.596 seconds Complete requests: 100000 Failed requests: 99350(Connect: 0, Receive: 0, Length: 99350, Exceptions: 0) Non-2xx responses: 99780 Total transferred: 31953900 bytes HTML transferred: 16180560 bytes Requests per second: 5377.62 [#/sec] (mean) Time per request: 743.823 [ms] (mean) Time per request: 0.186 [ms] (mean, across all concurrent requests) Transfer rate: 1678.09 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max Connect: 0 204 582.3 2 7522 Processing: 2 101 612.0 12 17019 Waiting: 2 76 287.2 12 6939 Total: 3 305 862.2 14 17019Percentage of the requests served within a certain time (ms)50% 1466% 1775% 20880% 21790% 101495% 123898% 301799% 3218100% 17019 (longest request)

優(yōu)化后

[root@/home/www]#ab -c 4000 -n 100000 http://test.demo.com/index.html Concurrency Level: 4000 Time taken for tests: 8.154 seconds Complete requests: 100000 Failed requests: 0 Non-2xx responses: 100000 Total transferred: 32000000 bytes HTML transferred: 16200000 bytes Requests per second: 12263.42 [#/sec] (mean) Time per request: 326.173 [ms] (mean) Time per request: 0.082 [ms] (mean, across all concurrent requests) Transfer rate: 3832.32 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max Connect: 1 139 418.0 5 3031 Processing: 2 101 106.9 74 1542 Waiting: 2 99 106.7 73 1542 Total: 3 240 433.1 81 4542Percentage of the requests served within a certain time (ms)50% 8166% 9175% 11580% 26890% 106695% 108598% 127599% 3018100% 4542 (longest request)

ab 測試過程出現(xiàn)的以下問題,則是由于客戶端原因造成的,而不是服務(wù)器原因,修改客戶端配置既可以

Completed 1000 requests Completed 2000 requests apr_socket_recv: Connection timed out (110) Total of 2893 requests completed

?

轉(zhuǎn)載于:https://www.cnblogs.com/tinywan/p/6936374.html

總結(jié)

以上是生活随笔為你收集整理的Nginx ab压力测试的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。