久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

MixPHP、Yii和CodeIgniter的并發(fā)壓力測(cè)試小結(jié)

這篇文章主要給大家介紹了關(guān)于MixPHP、Yii和CodeIgniter的并發(fā)壓力測(cè)試的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面

前言

MixPHP 是一個(gè)基于 Swoole 的高性能框架,CodeIgniter 是一個(gè)元老級(jí)的輕量級(jí)框架,Yii 是一個(gè)非常流行的框架,以下是三個(gè)框架的對(duì)比。

由于Yii/CodeIgniter 是基于 Apache/PHP-FPM 的傳統(tǒng)框架,如果使用 MixPHP 的正常 Swoole 部署方式來(lái)對(duì)比,顯得有些不公平,由于 MixPHP 同時(shí)支持在 Apache/PHP-FPM 中運(yùn)行,所以此次測(cè)試的 MixPHP 是部署在 Apache 之中。

環(huán)境

虛擬機(jī): 4 核,1G

使用 ab 工具壓測(cè),命令:ab -n 5000 -c 100 URL

Yii

Yii 關(guān)閉了 debug,并設(shè)置為 pro 環(huán)境。

默認(rèn)控制器代碼如下,輸出一個(gè) Hello World。

<?php public function actionIndex() { return 'Hello World'; }

CodeIgniter

默認(rèn)控制器代碼如下,輸出一個(gè) Hello World。

<?php public function index() { echo 'Hello World'; }

MixPHP

默認(rèn)控制器代碼如下,輸出一個(gè) Hello World。

public function actionIndex() { return 'Hello World'; }

開(kāi)始測(cè)試

1、測(cè)試Yii, QPS: 56.40

C:/Server/apache24vc11/bin>ab -n 5000 -c 100 http://www.b.com/ This is ApacheBench, Version 2.3 <$Revision: 1757674 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.b.com (be patient) Completed 500 requests Completed 1000 requests Completed 1500 requests Completed 2000 requests Completed 2500 requests Completed 3000 requests Completed 3500 requests Completed 4000 requests Completed 4500 requests Completed 5000 requests Finished 5000 requests Server Software: Apache/2.2.32 Server Hostname: www.b.com Server Port:  80 Document Path:  / Document Length: 9 bytes Concurrency Level: 100 Time taken for tests: 88.659 seconds Complete requests: 5000 Failed requests: 0 Total transferred: 1080000 bytes HTML transferred: 45000 bytes Requests per second: 56.40 [#/sec] (mean) Time per request: 1773.170 [ms] (mean) Time per request: 17.732 [ms] (mean, across all concurrent requests) Transfer rate:  11.90 [Kbytes/sec] received Connection Times (ms)  min mean[+/-sd] median max Connect: 0 0 1.0 1 29 Processing: 14 1765 4200.5 688 48084 Waiting: 14 1610 3741.9 682 46690 Total:  14 1766 4200.5 688 48084 WARNING: The median and mean for the initial connection time are not within a normal deviation  These results are probably not that reliable. Percentage of the requests served within a certain time (ms) 50% 688 66% 1087 75% 1400 80% 1657 90% 3029 95% 7665 98% 14760 99% 24300 100% 48084 (longest request)

2、測(cè)試 CodeIgniter , QPS: 144.42

C:/Server/apache24vc11/bin>ab -n 5000 -c 100 http://www.c.com/ This is ApacheBench, Version 2.3 <$Revision: 1757674 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.c.com (be patient) Completed 500 requests Completed 1000 requests Completed 1500 requests Completed 2000 requests Completed 2500 requests Completed 3000 requests Completed 3500 requests Completed 4000 requests Completed 4500 requests Completed 5000 requests Finished 5000 requests Server Software: Apache/2.2.32 Server Hostname: www.c.com Server Port:  80 Document Path:  / Document Length: 8 bytes Concurrency Level: 100 Time taken for tests: 34.621 seconds Complete requests: 5000 Failed requests: 0 Total transferred: 1075000 bytes HTML transferred: 40000 bytes Requests per second: 144.42 [#/sec] (mean) Time per request: 692.419 [ms] (mean) Time per request: 6.924 [ms] (mean, across all concurrent requests) Transfer rate:  30.32 [Kbytes/sec] received Connection Times (ms)  min mean[+/-sd] median max Connect: 0 0 0.7 1 22 Processing: 8 689 1014.3 480 13324 Waiting: 8 686 1012.2 478 13324 Total:  9 689 1014.3 480 13325 WARNING: The median and mean for the initial connection time are not within a normal deviation  These results are probably not that reliable. Percentage of the requests served within a certain time (ms) 50% 480 66% 673 75% 810 80% 902 90% 1238 95% 1808 98% 3336 99% 6037 100% 13325 (longest request)

3、測(cè)試 MixPHP, QPS: 440.48

C:/Server/apache24vc11/bin>ab -n 5000 -c 100 http://www.a.com/ This is ApacheBench, Version 2.3 <$Revision: 1757674 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.a.com (be patient) Completed 500 requests Completed 1000 requests Completed 1500 requests Completed 2000 requests Completed 2500 requests Completed 3000 requests Completed 3500 requests Completed 4000 requests Completed 4500 requests Completed 5000 requests Finished 5000 requests Server Software: Apache/2.2.32 Server Hostname: www.a.com Server Port:  80 Document Path:  / Document Length: 12 bytes Concurrency Level: 100 Time taken for tests: 11.351 seconds Complete requests: 5000 Failed requests: 0 Total transferred: 1025000 bytes HTML transferred: 60000 bytes Requests per second: 440.48 [#/sec] (mean) Time per request: 227.026 [ms] (mean) Time per request: 2.270 [ms] (mean, across all concurrent requests) Transfer rate:  88.18 [Kbytes/sec] received Connection Times (ms)  min mean[+/-sd] median max Connect: 0 1 0.9 1 25 Processing: 4 222 822.4 15 10376 Waiting: 4 221 822.4 14 10376 Total:  4 222 822.4 16 10376 Percentage of the requests served within a certain time (ms) 50% 16 66% 69 75% 214 80% 364 90% 561 95% 762 98% 978 99% 1829 100% 10376 (longest request)

結(jié)論

虛擬機(jī)文件IO性能太差,Yii 做300并發(fā)直接不響應(yīng),只好降低到100并發(fā)數(shù),同樣架構(gòu)的測(cè)試結(jié)果 MixPHP 領(lǐng)先。

你也來(lái)測(cè)試一下吧,https://github.com/mixstart/mixPHP

【網(wǎng)站聲明】本站除付費(fèi)源碼經(jīng)過(guò)測(cè)試外,其他素材未做測(cè)試,不保證完整性,網(wǎng)站上部分源碼僅限學(xué)習(xí)交流,請(qǐng)勿用于商業(yè)用途。如損害你的權(quán)益請(qǐng)聯(lián)系客服QQ:2655101040 給予處理,謝謝支持。

相關(guān)文檔推薦

這篇文章主要介紹了PHP有序表查找之插值查找算法,簡(jiǎn)單分析了插值查找算法的概念、原理并結(jié)合實(shí)例形式分析了php實(shí)現(xiàn)針對(duì)有序表插值查找的相關(guān)操作技巧,需要的朋友可以參考下
下面小編就為大家分享一篇ThinkPHP整合datatables實(shí)現(xiàn)服務(wù)端分頁(yè)的示例代碼,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
下面小編就為大家分享一篇PHP實(shí)現(xiàn)APP微信支付的實(shí)例講解,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
這篇文章主要介紹了PHP實(shí)現(xiàn)的多維數(shù)組排序算法,結(jié)合實(shí)例形式對(duì)比分析了php針對(duì)多維數(shù)組及帶有鍵名的多維數(shù)組進(jìn)行排序相關(guān)操作技巧與注意事項(xiàng),需要的朋友可以參考下
這篇文章主要為大家詳細(xì)介紹了php結(jié)合ajaxuploadfile實(shí)現(xiàn)無(wú)刷新文件上傳功能,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
本篇文章給大家詳細(xì)介紹了PHP開(kāi)發(fā)接口使用RSA進(jìn)行加密解密方法,對(duì)此有興趣的朋友可以學(xué)習(xí)下。
主站蜘蛛池模板: 成人羞羞国产免费游戏 | 日日av| 亚洲经典一区二区 | 亚洲一级黄色片 | 日韩精品免费看 | 成年人免费看片 | 午夜免费福利视频 | 91久久久精品 | 国产精品久久久久久久久久 | 国产三级在线观看视频 | 黄色片久久 | 欧美成人激情视频 | 四虎4hu永久免费网站影院 | 久久久精品在线观看 | 欧美在线免费观看视频 | 亚洲理论片 | 国产无精乱码一区二区三区 | 欧美激情一二三区 | 九九热在线观看 | 国产午夜一区二区三区 | 婷婷视频在线 | 三级中文字幕 | 双性呜呜宫交受不住了h | 日韩av高清在线观看 | 中文字幕在线视频观看 | 国内精品久久久久 | 久热精品在线 | 欧美在线一区二区三区 | 精品久久一区二区三区 | 亚洲精品成人在线 | 国产精品久久久久久久久借妻 | 激情高潮到大叫狂喷水 | 亚洲第十页 | 亚洲欧美高清 | 欧美日韩一区二区三区视频 | 中文字幕免费观看 | 一区免费视频 | 天天摸天天爽 | 日韩视频免费在线观看 | 在线视频一区二区三区 | 欧美精品一区在线 |