{"id":130,"date":"2020-10-27T11:06:45","date_gmt":"2020-10-27T03:06:45","guid":{"rendered":"https:\/\/www.92k.xin\/?p=130"},"modified":"2020-10-27T13:22:15","modified_gmt":"2020-10-27T05:22:15","slug":"nginx1-18-0-gcc%e7%89%88%e6%9c%ac%e4%b8%8d%e5%90%8c%e7%9a%84%e6%95%88%e6%9e%9c%e6%b5%8b%e8%af%95","status":"publish","type":"post","link":"https:\/\/www.92k.xin\/?p=130","title":{"rendered":"Nginx +GCC\u4e0d\u540c\u7248\u672c\u7684\u6548\u679c\u6d4b\u8bd5"},"content":{"rendered":"\n

\u9996\u5148\u53c2\u8003 https:\/\/www.92k.xin\/?p=21<\/a> \u540c\u65f6\u6211\u4eec\u5728\u539f\u6765\u88c5MYSQL8\u7684\u673a\u5668\u4e0a\u9762\uff0c\u7528GCC 9.3.0 \u6765\u5b8c\u6210Nginx\u7684\u7f16\u8bd1\u5de5\u4f5c\u3002<\/p>\n\n\n\n

\u6211\u4eec\u5148\u4e0a\u4e24\u4e2a\u7248\u672c\u7684\u6548\u679c\u56fe<\/p>\n\n\n\n

\"%title\u63d2\u56fe%num\"
nginx gcc 4.8.3\u7248\u672c IP:192.168.1.101<\/figcaption><\/figure>\n\n\n\n
\"%title\u63d2\u56fe%num\"
nginx gcc 9.3.1 \u7248\u672c IP:192.168.1.105<\/figcaption><\/figure>\n\n\n\n

\u4e24\u53f0\u865a\u62df\u673a\u90fd\u662f8\u6838 4G\uff0cab\u538b\u6d4b\u4e0b\uff0c\u5148\u4e0a\u538b\u6d4b\u7ed3\u679c\u3002<\/p>\n\n\n\n

ab.exe -c5000 -n50000 http:\/\/192.168.1.101\/\nThis is ApacheBench, Version 2.3 <$Revision: 1874286 $>\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http:\/\/www.zeustech.net\/\nLicensed to The Apache Software Foundation, http:\/\/www.apache.org\/\n\nBenchmarking 192.168.1.101 (be patient)\nCompleted 5000 requests\n...\u4e2d\u95f4\u8fc7\u7a0b\u7701\u7565\nFinished 50000 requests\n\n\nServer Software:        nginx\/1.18.0\nServer Hostname:        192.168.1.101\nServer Port:            80\n\nDocument Path:          \/\nDocument Length:        13 bytes\n\nConcurrency Level:      5000\nTime taken for tests:   28.673 seconds\nComplete requests:      50000\nFailed requests:        0\nTotal transferred:      12900000 bytes\nHTML transferred:       650000 bytes\nRequests per second:    1743.81 [#\/sec] (mean)\nTime per request:       2867.284 [ms] (mean)\nTime per request:       0.573 [ms] (mean, across all concurrent requests)\nTransfer rate:          439.36 [Kbytes\/sec] received\n\nConnection Times (ms)\n              min  mean[+\/-sd] median   max\nConnect:        0    0   3.7      0     441\nProcessing:   436 2735 596.6   2776    4248\nWaiting:        3 1422 798.3   1414    3775\nTotal:        436 2735 596.6   2776    4249\n\nPercentage of the requests served within a certain time (ms)\n  50%   2776\n  66%   2886\n  75%   3002\n  80%   3031\n  90%   3552\n  95%   3743\n  98%   3794\n  99%   4177\n 100%   4249 (longest request)<\/pre><\/div>\n\n\n\n
ab.exe -c5000 -n50000 -k http:\/\/192.168.1.101\/\nThis is ApacheBench, Version 2.3 <$Revision: 1874286 $>\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http:\/\/www.zeustech.net\/\nLicensed to The Apache Software Foundation, http:\/\/www.apache.org\/\n\nBenchmarking 192.168.1.101 (be patient)\nCompleted 5000 requests\n...\u4e2d\u95f4\u8fc7\u7a0b\u7701\u7565\nFinished 50000 requests\n\n\nServer Software:        nginx\/1.18.0\nServer Hostname:        192.168.1.101\nServer Port:            80\n\nDocument Path:          \/\nDocument Length:        13 bytes\n\nConcurrency Level:      5000\nTime taken for tests:   5.294 seconds\nComplete requests:      50000\nFailed requests:        0\nKeep-Alive requests:    50000\nTotal transferred:      13150000 bytes\nHTML transferred:       650000 bytes\nRequests per second:    9444.33 [#\/sec] (mean)\nTime per request:       529.418 [ms] (mean)\nTime per request:       0.106 [ms] (mean, across all concurrent requests)\nTransfer rate:          2425.64 [Kbytes\/sec] received\n\nConnection Times (ms)\n              min  mean[+\/-sd] median   max\nConnect:        0    0   0.3      0      17\nProcessing:    53  396 393.7    263    2262\nWaiting:        1  396 393.6    263    2262\nTotal:         53  396 393.7    263    2262\n\nPercentage of the requests served within a certain time (ms)\n  50%    263\n  66%    373\n  75%    424\n  80%    493\n  90%    872\n  95%   1291\n  98%   1836\n  99%   2012\n 100%   2262 (longest request)<\/pre><\/div>\n\n\n\n
ab.exe -c5000 -n50000  http:\/\/192.168.1.105\/\nThis is ApacheBench, Version 2.3 <$Revision: 1874286 $>\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http:\/\/www.zeustech.net\/\nLicensed to The Apache Software Foundation, http:\/\/www.apache.org\/\n\nBenchmarking 192.168.1.105 (be patient)\nCompleted 5000 requests\n...\u4e2d\u95f4\u8fc7\u7a0b\u7701\u7565\nFinished 50000 requests\n\n\nServer Software:        nginx\/1.18.0\nServer Hostname:        192.168.1.105\nServer Port:            80\n\nDocument Path:          \/\nDocument Length:        13 bytes\n\nConcurrency Level:      5000\nTime taken for tests:   27.005 seconds\nComplete requests:      50000\nFailed requests:        0\nTotal transferred:      12900000 bytes\nHTML transferred:       650000 bytes\nRequests per second:    1851.51 [#\/sec] (mean)\nTime per request:       2700.502 [ms] (mean)\nTime per request:       0.540 [ms] (mean, across all concurrent requests)\nTransfer rate:          466.49 [Kbytes\/sec] received\n\nConnection Times (ms)\n              min  mean[+\/-sd] median   max\nConnect:        0    0   0.7      0      24\nProcessing:   486 2563 387.8   2650    2884\nWaiting:        1 1317 695.9   1318    2798\nTotal:        487 2563 387.8   2651    2884\n\nPercentage of the requests served within a certain time (ms)\n  50%   2651\n  66%   2667\n  75%   2682\n  80%   2691\n  90%   2765\n  95%   2823\n  98%   2845\n  99%   2863\n 100%   2884 (longest request)<\/pre><\/div>\n\n\n\n
ab.exe -c5000 -n50000 -k  http:\/\/192.168.1.105\/\nThis is ApacheBench, Version 2.3 <$Revision: 1874286 $>\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http:\/\/www.zeustech.net\/\nLicensed to The Apache Software Foundation, http:\/\/www.apache.org\/\n\nBenchmarking 192.168.1.105 (be patient)\nCompleted 5000 requests\n...\u4e2d\u95f4\u8fc7\u7a0b\u7701\u7565\nFinished 50000 requests\n\n\nServer Software:        nginx\/1.18.0\nServer Hostname:        192.168.1.105\nServer Port:            80\n\nDocument Path:          \/\nDocument Length:        13 bytes\n\nConcurrency Level:      5000\nTime taken for tests:   5.896 seconds\nComplete requests:      50000\nFailed requests:        0\nKeep-Alive requests:    50000\nTotal transferred:      13150000 bytes\nHTML transferred:       650000 bytes\nRequests per second:    8480.82 [#\/sec] (mean)\nTime per request:       589.566 [ms] (mean)\nTime per request:       0.118 [ms] (mean, across all concurrent requests)\nTransfer rate:          2178.18 [Kbytes\/sec] received\n\nConnection Times (ms)\n              min  mean[+\/-sd] median   max\nConnect:        0    0   0.3      0      16\nProcessing:    61  450 421.5    349    2384\nWaiting:        0  450 421.4    349    2384\nTotal:         61  450 421.5    349    2384\n\nPercentage of the requests served within a certain time (ms)\n  50%    349\n  66%    415\n  75%    475\n  80%    627\n  90%    976\n  95%   1408\n  98%   1949\n  99%   2153\n 100%   2384 (longest request)<\/pre><\/div>\n\n\n\n

\u6211\u4eec\u6765\u7efc\u5408\u5bf9\u6bd4\u4e0b<\/p>\n\n\n\n

IP<\/td>GCC\u7248\u672c<\/td>\u65e0ka<\/td>ka<\/td>50%\u65e0ka<\/td>50%\u6709ka<\/td><\/tr>
192.168.1.101<\/td>4.8.3<\/td>1743.81<\/td>9444.33<\/td>2776ms<\/td>263ms<\/td><\/tr>
192.168.1.105<\/td>9.3.1<\/td>1851.51<\/td>8480.82<\/td>2651ms<\/td>349ms<\/td><\/tr><\/tbody><\/table>
QPS\u5bf9\u6bd4(ka = keep-alive)<\/figcaption><\/figure>\n\n\n\n

\u603b\u7ed3\uff1a\u5404\u6709\u5343\u79cb\uff0c\u7248\u672c\u9ad8\u7684\u4e0d\u4e00\u5b9a\u6548\u679c\u597d\u3002\u8fd9\u53ea\u662f\u4e00\u6b21\u968f\u673a\u538b\u6d4b\u7684\u5bf9\u6bd4\u7ed3\u679c\uff0c\u6548\u679c\u6ca1\u6709\u6743\u5a01\u6027<\/strong><\/span>\uff0c\u7ae5\u978b\u4eec\u53ef\u4ee5\u591a\u538b\u6d4b\u51e0\u6b21\uff0c\u7136\u540e\u6c42\u5e73\u5747\u503c\uff0c\u603b\u800c\u8fbe\u5230\u4e25\u8c28\u7684\u7ed3\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u9996\u5148\u53c2\u8003 https:\/\/www.92k.xin\/?p=21 \u540c\u65f6\u6211\u4eec\u5728\u539f\u6765\u88c5MYSQL8\u7684\u673a\u5668\u4e0a\u9762\uff0c\u7528GCC… <\/p>\n