ãœãããŠã§ã¢è£œåãéçºããå Žåãéçºè ã®ããŒã ã¯ãŸãããœãããŠã§ã¢ã·ã¹ãã ã®æ§é ã決å®ãããœãããŠã§ã¢ãã©ãããã©ãŒã ãæ£ããéžæãããšãã課é¡ã«çŽé¢ããŸãã
ãããè¡ãã«ã¯ãããã¹ãŠãã©ãã ãéãæ©èœãããããããããããã®æ©èœãå¿ èŠã§ããïŒããŸã§ãããªãå€æ°ã®ç¹æ§ãèæ ®ããå¿ èŠããããŸãã ãããŠæ¯åã ãã¬ã€ã³ã¹ããŒãã³ã°ã®ç¬éã«ãããŒã ã¯ãã¬ãŒã ã¯ãŒã¯ã®å©äŸ¿æ§ãé床ãããã«å®è£ ãããŠããäžé£ã®æ©èœããŸãã¯ãã¬ãŒã ã¯ãŒã¯ãšäºææ§ã®ããã¢ãžã¥ãŒã«ãæ¯èŒããŸãã
ããããã©ã¡ããããè¯ããããéããããçç£çã§ããïŒ
éçºè ã¯ãã¬ãŒã ã¯ãŒã¯ãåžžã«æ¯èŒããŠããã®åé¡ãèªåèªèº«ã§æ確ã«ããŠããŸãã ããšãã°ãLukasz Kujawaã®èšäºã¯ PHPãã¬ãŒã ã¯ãŒã¯ãæ¯èŒããŠããŸãã 1ã€ã®ãbutãã¯2013幎ã®èšäºã§ãã ãããæéãçµã¡ãŸã...ãããã£ãŠãç§ãã¡ã¯ãã¬ãŒã ã¯ãŒã¯ã®ç¬èªã®å®éã®æ¯èŒãè¡ãããšã«ããŸããã
ããã©ãŒãã³ã¹ãè©äŸ¡ããããã«ã PHPãã¬ãŒã ã¯ãŒã¯ãã³ãããŒã¯ã䜿çšãããŸããã 圌ã¯æ¯èŒã®ããã«å€ãã®ãã¬ãŒã ã¯ãŒã¯ïŒäžèšã®ãã®ã ãã§ãªãïŒãæäŸããŠããŸãããèè ã¯ãããžã§ã¯ãã®æ°ããããŒãžã§ã³ããªããžããªã«è¿œå ããããšãæ¥ãã§ããŸããã æ°ããããŒãžã§ã³ãè¿œå ããå Žåã¯é£ãããããŸããã
ãã®èšäºã®äž»ãªç®æšã®1ã€ã¯ãPHPã®æ°ããããŒãžã§ã³ã®çç£æ§ãšå¹çã®å®çšçãªæ¹åãèŠåºãããšã§ãã ãããã£ãŠããã¹ãã¯PHP 5.6 / 7.0 / 7.1ã§å®æœãããŸãã
äœãæ¯èŒããŸããïŒ
æ¯èŒã®ããã«ã次ã®ãã¬ãŒã ã¯ãŒã¯ãéžæãããŸããã
- ã¹ãªã -3.0
- ci-3.0
- ã«ãŒã¡ã³-5.1
- yii-2.0
- silex-1.3
- çæ1.8
- phpixie-3.2
- zf-2.5
- zf-3.0
- symfony-2.7
- symfony-3.0
- laravel-5.3
- laravel-5.4
- bluzïŒããŒãžã§ã³7.0.0-PHP5.6ã®å ŽåãPHP7.0以éã®å Žåã¯ããŒãžã§ã³7.4ïŒ
- ze-1.0
- ãã¡ã«ã³ã³-3.0
ãã¹ãã¯æ¡ä»¶ä»ãã§4ã€ã®ã¿ã€ãã«åããããŸãã
- ã¹ã«ãŒããã
- å æã¡ã¢ãªïŒã¡ã¢ãªïŒã
- ã©ã³ã¿ã€ã ïŒå®è¡æéïŒã
- ã€ã³ã¯ã«ãŒããã¡ã€ã«ïŒã€ã³ã¯ã«ãŒããã¡ã€ã«ïŒã®æ°ã
ãã¹ãææ³ãšãã¹ããã³ã
ãã¹ããè¡ââããããã·ã³ã¯ã次ã®ç¹æ§ããããŸãã
Operation system: Linux Mint 17 Cinnamon 64-bit
Cinnamin Version 2.2.16
Linux Kernel: 3.13.0-24-generic
Processor: Intel Core i3-4160 CPU 3.60 Ghz X 2
Memory: 8 GB
Server version: Apache/2.4.7 (ubuntu)
Server build: Jul 15 2016
php 7.1 / php7.0 / php5.6
ã³ãã³ããå ¥åãããšã
git clone https://github.com/kenjis/php-framework-benchmark
-ãšãã¬ãŒã ã¯ãç§ãã¡ã®è»ã®äžã«ãã§ã«ãããŸãã ç§ãã¡ã¯ãã³ãã䜿çšããŠããã®ã§ãããªããèšå®ããå¿ èŠããããŸãã
# Added net.netfilter.nf_conntrack_max = 100000 net.nf_conntrack_max = 100000 net.ipv4.tcp_max_tw_buckets = 180000 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_fin_timeout = 10
sudo sysctl -p
PHPãã¬ãŒã ã¯ãŒã¯ - ãã³ãããŒã¯ã®æ§é ã«ã€ããŠå°ãïŒ
/ãã³ãããŒã¯ - ïŒãŠãŒãã£ãªãã£ãabã§ïŒ1ç§ãããã®èŠæ±æ°ã«é¢ããæ å ±ãåéããããã®è²¬ä»»ãããã®bash-ã¹ã¯ãªãããæ å ±ã®éãå«ãŸããå€ãã®æéãè²»ãããããããŠã©ã®ããã«å€ãã®ãã¡ã€ã«ããã¡ã€ã«ããåŒã³åºããããåºçºç¹ãã
/ libã« - ãHello Worldãã®ããŒãžã衚瀺ãããçµæãšãã£ãŒããšããŒãã«ã®æ€éåŸã«åä¿¡ããæ å ±ãåŠçããããã®è²¬ä»»ããããã¡ã€ã«ãå«ããã£ã¬ã¯ããªã
/åºå -ãã°ã¯ããã¹ãåŸã«è¿œå ãããŠãããã£ã¬ã¯ããªã ãã¹ãããããã¡ã€ã«ã®ããããã®ããã®2ã€ã®ãã¡ã€ã«ããããŸãã.ab.log - ãŠãŒãã£ãªãã£ã®äœæ¥ã®åŸã«ãã°ã¯ABã§ã.OUTPUT - ïŒéåžžãããŒäžçãšã¡ã¢ãªããŒã¿ãå®è¡æã«ã¯ããã¡ã€ã«ã䜿çšïŒãç»é¢ã«è¡šç€ºãããæ å ±ãå«ãŸããŠããŸãã
æ®ãã®ãã©ã«ã - ãã§ã«1ã€ã®ã³ã³ãããŒã©ã«è¿œå ããã空çœã®ãã¬ãŒã ãã«ãŒã«ã«ãã£ãŠã³ã³ãã€ã«ãããURIã®åŸªç°ãšãæååã®ãHello Worldããè¿ããŸãããã®ãã¬ãŒã ã¯ãŒã¯ãåç §ããŠãã ããã
ãã¹ããéå§ããã«ã¯ãæåã®ãã¬ãŒã ã¯ãŒã¯ãèšå®ããå¿ èŠããããŸãã äºã€ã®ã¢ãããŒããèããŠã¿ãŸãããã
ããŒã
bash setup.sh
ã®configure fremvork list.sh.ãã¡ã€ã«ã«èšèŒãããŠãããã® ããªãã¯ãããç·šéããããšãã§ããŸããã¹ããããã©ã«ããè¿œå ããåé€ããŸãã ããã¯ããªããããå¿ èŠãããããã«èšå®ãããŠããŸãã
ã³ãã³ã
bash setup.sh fatfree-3.5/ slim-3.0/ lumen-5.1/ silex-1.3/
3.0 /ã«ãŒã¡ã³-5.1 /ãµã€ã¬ãã¯ã¹-1.3 /ããªãã¯ã³ãã³ãã«ãã®ãã©ã¡ãŒã¿ãèšå®ããä»»æã®å¥ã®ãã¬ãŒã ã¯ãŒã¯ãã€ã³ã¹ããŒã«ããããšãã§ããŸãã ããã€ãã®ã±ãŒã¹ã§ã¯ãããã¯äŸ¿å©ã§ãããæã ã¯æåã®ã¢ãããŒãã䜿çšããŠããŸããã
ãã¬ãŒã ã¯ãŒã¯ã®èšå®ãè¡ã£ãåŸãæã ã¯äœ¿çšããŠãã¹ãããæã¡äžã
bash benchmark.sh
ã
端æ«ã®çµããã§ãã¹ããã¬ãŒã ã¯ãŒã¯ãç§ãããã®èŠæ±ã®æ°ãã¡ã¢ãªã®çžå¯Ÿå€ããªãã³ã«ããããã®ãã©ã¡ãŒã¿ã®çžå¯Ÿå€ã®ãªã¹ããå«ãããŒãã«ããããŸããã
衚瀺ã°ã©ãã®ããã«ãæã ã¯ãžã®åç §ã䜿çšããŸããhttpïŒ// localhostã®/ PHPãã¬ãŒã ã¯ãŒã¯-ãã³ãããŒã¯/ã ã
ããªããæ³åã§ããããã«ãApacheã®èšå®ãäœæãã圌ããã©ã«ããã¬ãŒã ã«èŠããããã«ããå¿ èŠããããŸããã ãã®ãã¹ãŠã¯ãReadmeãã¡ã€ã«ã«èšè¿°ãããŠããã®ã§ãåé¡ã¯çºçããŸããã
ãã¹ããã¬ãŒã ã¯ãŒã¯ã®çµæ
åã»ã¯ã·ã§ã³ã¯ãçµæã®æ瀺2ã€ã®åœ¢åŒãããªãæ§é ãæããŠããŸãã
æåã®åœ¢åŒã¯ã - ããã¯è¡šçŸã®è¯ãã¿ã€ãã§ãã ããããã®ç¹æ§å³ã¯ã4ãå«ãŸããŠããŸãã åãã£ãŒãã¯ããã¬ãŒã ã¯ãŒã¯ããã©ã¹çŽ¯ç©ã°ã©ãã®æ¯èŒã瀺ããŸãã ããã¯ãPHPã®ç¹å®ã®ããŒãžã§ã³ã䜿çšããŠæ§ç¯ãããŸããã ãããã£ãŠãPHPããã¬ãŒã ã¯ãŒã¯ã®æ¹åã®é²åã远跡ããããšãå¯èœã§ãã
äºçªç®ã®åœ¢åŒã¯ã - ããŒãã«ã®åœ¢ã§ã®ãã¹ãã®çµæã§ããïŒååãªæçããã®ã¯ãçå£ã«è©±ãããŸããã - ç§ã¯ããå€ãã®æ°åãäžããŸãïŒïŒã
çç£æ§ïŒã¹ã«ãŒãããïŒ
æã ã®ç¶æ³ã«é¢ããŠã¯ãã¹ã«ãŒãããç¹æ§ã¯ãæã ã®ãã¬ãŒã ã¯ãŒã¯ãç§ä»¥å ã«åŠçããããšãã§ããããšãèŠæ±æ°ã§æž¬å®ãããŸããã æ°ãããçç£æã ã®ã¢ããªã±ãŒã·ã§ã³ããããã£ãŠãããé«ãããã¯æ£ããããã»ã¹ã¯ãå€æ°ã®ãŠãŒã¶ãŒãèŠæ±ããããšãã§ããŸãã®ã§ã
æã ã¯ïŒã¯ãšãªæ¯ç§ïŒä»¥äžã®çµæãåŸãŸããïŒ
PHP 5.6 | PHP 7.0 | PHP 7.1 | |
---|---|---|---|
phalcon-3.1.2 | 5058.00 | 5130.00 | 7535.00 |
CI-3.0 | 2943.55 | 4116.31 | 4998.05 |
ã¹ãªã 3.0 | 2074.59 | 3143.94 | 3681.00 |
Yiiã®-2.0 | 1256.31 | 2276.37 | 2664.61 |
ãµã€ã¬ãã¯ã¹ã»-1.3 | 1401.92 | 2263.90 | 2576.22 |
ã«ãŒã¡ã³-5.1 | 1316.46 | 2384.24 | 2741.81 |
ZE-1.0 | 1181.14 | 1989.99 | 1741.81 |
phpixie-3.2 | 898.63 | 1677.15 | 1896.23 |
çæ-1.8 | 1044.77 | 1646.67 | 1770.13 |
bluz-7.3.1 | - * | 1774.00 | 1890.00 |
ZF-2.5 | 198.66 | 623.71 | 739.12 |
ZF-3.0 | 447.88 | 1012.57 | 1197.26 |
symfonyã®-2.7 | 360.03 | 873.40 | 989.57 |
symfonyã®-3.0 | 372.19 | 853.51 | 1022.28 |
laravel-5.3 | 258.62 | 346.25 | 625.99 |
laravel-5.4 | 219.82 | 413.49 | 600.42 |
* - bluz-7.3.1ã¯ãPHP 5.6ããµããŒãããŠããŸããã
æ確ã«ããããã«ãPHPã®ããŒãžã§ã³ããšã«ãã£ãŒãïŒ
PHP5.6ïŒ
PHP7.0ïŒ
PHP7.1ïŒ
ïŒãã¬ãŒã ã¯ãŒã¯ã«ãã£ãŠïŒå šäœçŽ¯ç©ãã£ãŒãã
å é ã¡ã¢ãªïŒæ倧ã¡ã¢ãªïŒ
ïŒã¡ã¬ãã€ãåäœïŒãã®æ©èœã¯ããã®ã¿ã¹ã¯ã®ããã©ãŒãã³ã¹ã§ãã¬ãŒã ã¯ãŒã¯ã«ãã£ãŠå ããããã¡ã¢ãªã®éãæ åœããŠããŸãã å°ããªãã®æ°ãããè¯ãç§ãã¡ã®ããã«ããµãŒãçšïŒ
PHP 5.6 | PHP 7.0 | PHP 7.1 | |
---|---|---|---|
phalcon-3.1.2 | 0.27 | 0.38 | 0.37 |
CI-3.0 | 0.42 | 0.38 | 0.38 |
ã¹ãªã 3.0 | 0.61 | 0.55 | 0.55 |
Yiiã®-2.0 | 1.31 | 0.91 | 0.91 |
ãµã€ã¬ãã¯ã¹ã»-1.3 | 0.74 | 0.65 | 0.65 |
ã«ãŒã¡ã³-5.1 | 0.80 | 0.63 | 0.63 |
ZE-1.0 | 0.79 | 0.56 | 0.56 |
phpixie-3.2 | 1.22 | 0.82 | 0.82 |
çæ-1.8 | 0.7 | 0.6 | 0.6 |
bluz-7.3.1 | - * | 0.69 | 0.69 |
ZF-2.5 | 3.06 | 1.34 | 1.34 |
ZF-3.0 | 2.12 | 1.09 | 1.08 |
symfonyã®-2.7 | 3.11 | 1.41 | 1.42 |
symfonyã®-3.0 | 2.86 | 1.30 | 1.32 |
laravel-5.3 | 2.91 | 2.04 | 2.04 |
laravel-5.4 | 3.04 | 1.45 | 1.49 |
* - bluz-7.3.1ã¯ãPHP 5.6ããµããŒãããŠããŸããã
PHP 5.6ïŒ
PHP 7.0ïŒ
PHP 7.1ïŒ
ïŒãã¬ãŒã ã¯ãŒã¯ã«ãã£ãŠïŒå šäœçŽ¯ç©ãã£ãŒãã
ã©ã³ã¿ã€ã
ãªãŒãã¿ã€ã - ããã¯ã¿ã¹ã¯ã«ã·ã¹ãã ã«ãããæéã çºè¡ã·ã¹ãã ãžã®ã¿ã¹ã¯ã®å®è¡çµæã®å é ãã枬å®ããŸããã
ç§ãã¡ã¯ãããã¯ãã°ããæéãããããŸãã©ã®ãããã®ã¡ã¢ãªãç§ãããã®èŠæ±ã¯ããã¬ãŒã ã¯ãŒã¯ãæ±ãããšãã§ããŸãã©ã®ããã«å€ãèããããŠããŸããã ä»ãç§ãã¡ã¯ããµãŒããŒããã®å¿çãåŸãããšãæåŸ ãã¹ãã§ããã©ã®ãããã®ããšãæ€èšããŠãã ããã ããè¯ãç§ãã¡ã®ããã«ããããŠã客æ§ã®ã¢ããªã±ãŒã·ã§ã³ã®ç¥çµç³»ã®ããã«ãå€ãäžããŠãã ããã
æéã¯ããªç§ïŒmsïŒã«ç€ºãããŠããŸãïŒ
PHP 5.6 | PHP 7.0 | PHP 7.1 | |
---|---|---|---|
phalcon-3.1.2 | 1.300 | 1.470 | 1.080 |
CI-3.0 | 0.996 | 0818 | 1,007 |
ã¹ãªã 3.0 | 1,530 | 1.228 | 0.662 |
Yiiã®-2.0 | 1478 | 1.410 | 1.639 |
ãµã€ã¬ãã¯ã¹ã»-1.3 | 4.657 | 1.625 | 2.681 |
ã«ãŒã¡ã³-5.1 | 2.121 | 1.829 | 1.228 |
ZE-1.0 | 2.629 | 2.069 | 1.528 |
phpixie-3.2 | 9329 | 4.757 | 1,911 |
çæ-1.8 | 3.283 | 2,684 | 1.425 |
bluz-7.3.1 | - * | 1.619 | 1.921 |
ZF-2.5 | 22042 | 5.011 | 3.998 |
ZF-3.0 | 12680 | 2.506 | 2989 |
symfonyã®-2.7 | 6.529 | 3.902 | 2.384 |
symfonyã®-3.0 | 9335 | 3.987 | 2.820 |
laravel-5.3 | 19885 | 4.840 | 2.622 |
laravel-5.4 | 19561 | 4.758 | 3.940 |
PHP 5.6ïŒ
PHP 7.0ïŒ
PHP 7.1ïŒ
ïŒãã¬ãŒã ã¯ãŒã¯ã«ãã£ãŠïŒå šäœçŽ¯ç©ãã£ãŒãã
ãã¡ã€ã«ãå«ããŸã
å€ãã®è²¬ä»»ãããç¹åŸŽã¯ããã¬ãŒã ã¯ãŒã¯ã®ãã¡ã€ã«ããšã³ããªãŒãã€ã³ããã§èª¬æãããŠãããã¡ã€ã«ãå«ãŸããŠããŸãã ã·ã¹ãã ãæ€çŽ¢ããã³æ¥ç¶æã«ããã€ãã®æéãè²»ãããŠããããšã¯æããã§ãã ããã¯ä»äºãã¹ããŒãã¢ãããã£ãã·ã¥ã§ã®äœæ¥åŸã®æ代ã®æ çµã¿ãéåžžã§ããã®ã§ããã®çµæã ãã¡ã€ã«ããå°ãããããéã ãã¢ããªã±ãŒã·ã§ã³ã®æåã®èµ·åã«ãªããŸãã
phalcon-3.1.2 | 5 |
CI-3.0 | 26 |
ã¹ãªã 3.0 | 53 |
Yiiã®-2.0 | 46 |
ãµã€ã¬ãã¯ã¹ã»-1.3 | 63 |
ã«ãŒã¡ã³-5.1 | 37 |
ZE-1.0 | 68 |
phpixie-3.2 | 163 |
çæ-1.8 | 53 |
bluz-7.3.1 | 95 |
ZF-2.5 | 222 |
ZF-3.0 | 188 |
symfonyã®-2.7 | 110 |
symfonyã®-3.0 | 192 |
laravel-5.3 | 38 |
laravel-5.4 | 176 |
5.3ãšLaravel Laravel 5.4ã®éã«å«ãŸãããã¡ã€ã«ã®æ°ã®å·®ã¯å¥åŠã«æãããšåè°ãçŽäºãªã©ãçãåŸãŸã ç§ãã¡ã¯ãç¶æ³ãæ確ã«ããããã«æ©ããŸãã 次ã®ã³ãã³ãã§ãç¥ã£ãŠããããã«
php artisan optimize --force
Laravel 5.3ã§ãã¡ã€ã«compiled.phpãçæããããšãã§ããããã«ãã£ãŠ1ã«ãããã眮ãããšã«ãã£ãŠãã€ã³ã¯ã«ãŒããã¡ã€ã«ã®æ°ãæžãããŸãã ããããããã«1ããããã§ã¯ãªããïŒLaravel 5.4ã§ãã®ãã¡ã€ã«ãçæããããã®ããŒã ã¯ãããããŸããã ïŒæ°ããŠéçºè ã¯ããã®æ©èœãåé€ããããšã決ããhttps://github.com/laravel/framework/pull/17003 ããã®ããã©ãŒãã³ã¹ãã¥ãŒãã³ã°ãopcacheã䜿çšããããšããå§ãããŸãïŒã
ç§ã¯æŽæ°ããå¿ èŠããããŸããïŒ
ããŒãžã§ã³ã®æŠèŠã¯ä»¥äžã®PHPã®æ°ããããŒãžã§ã³ãžã®ç§»è¡ïŒãŸãã¯åæéžæïŒæã®çç£æ§ã®åäžãšè³æºã®æå¹å©çšãäœãèµ·ãããã瀺ããŠããŸãã
Zend Frameworkã®2.5> 200ïŒ - PHP 5.6ããPHP 7.0æå°éã®æ§èœLaravel 5.3 + 33ïŒ ã®å¢å ãåã³æ倧ãšã»ãŒ+ 90ïŒ ã®å¹³åçç£æ§ã®åäžã«å€æŽããå Žåã
ããŒãžã§ã³7.0ãã7.1ãžã®ç§»è¡ã¯ãšãŠãè¡æçãªããŸã çŽ20ïŒ ã®æ§èœå¢å ã®å¹³åå€ãäžããŠããŸããã
PHPã®ç°ãªãããŒãžã§ã³ã®ããã©ãŒãã³ã¹äžã®ãã¹ãŠã®ããŒã¿ãæã¡èŸŒã¿ãæã ã¯ããã«æ¥ãããããã¬ã¹ãã§ãã
楜ããäºå®ïŒLaravel 5.3 PHP 7.0ããããŒãžã§ã³7.1ãããŒãžã§ã³7.0ãã移è¡äžã®æ倧ã®å¢å ã«PHP 5.6ãã移è¡ãããšãã®ããã©ãŒãã³ã¹ã«æå°ã®å¢å ã瀺ãããã®çµæ- Laravel 5.3åã³5.4 PHP 7.1ã®æ§èœã«å®è³ªçã«åãã§ãã
ã¡ã¢ãªæ¶è²»éã¯ãPHP 7.0ã«PHP 5.6ããã®ç§»è¡ã¯ãã¢ããªã±ãŒã·ã§ã³ã30ïŒ ããå°ãªãã¡ã¢ãªãæ¶è²»ããããšãã§ããŸãããã«ãæé©åãããŠããŸãã
ããŒãžã§ã³7.1ãžã®ããŒãžã§ã³7.0ããã®ã¢ããã°ã¬ãŒãã¯ã»ãšãã©ãªãæé·ãæäŸãããããŠæåŸã®SymfonyãšLaravelã圌ãã¯ããå°ããéå§ãããããããã€ãã¹ãã«è¡ããã§ããé£ã¹ãŸããã
ããå®è¡æã«èŠãŠããå€ãã®ã§ããããããããã§ã¯ãããŸãã«ãããã¹ãŠãæ£åžžã§ãã
- PHP 7.0ã«PHP 5.6ãã移åãããšãããªãã«44ïŒ ã®å¹³åã«ããå é床ãäžããã ããã
- PHP 7.1ã«PHP 7.0ãã移åãããšãããªãã«å¥ã®14ïŒ ã®å éãåŸãããŸãã
ã泚æ ABã䜿çšããŠãã¹ããã - ç§ãã¡ãçŽé¢ããŠãããã®ã
ãã©ã®ãããªã¹ãªã ã§phpixieã§Â» - ãã®è³ªåã¯ããããã®ãã¬ãŒã ã¯ãŒã¯ãšã®å¯Ÿè©±ãŠãŒãã£ãªãã£ABã®è¡åã調æ»ããããæ±ããŠããŸãã
ã¹ãªã 3.0ã«å¯ŸããŠåå¥ã«ãã¹ããå®è¡ããŸãã
ab -c 10 -t 3 http://localhost/php-framework-benchmark/slim-3.0/index.php/hello/index
Concurrency Level: 10
Time taken for tests: 5.005 seconds
Complete requests: 2
Failed requests: 0
Total transferred: 1800 bytes
HTML transferred: 330 bytes
Requests per second: 0.40 [#/sec] (mean)
Time per request: 25024.485 [ms] (mean)
Time per request: 2502.448 [ms] (mean, across all concurrent requests)
Transfer rate: 0.35 [Kbytes/sec] received
äœããééã£ãŠãã - ç§ãããã®èŠæ±ã®æ°ãããã0.4ïŒïŒïŒ
ab -c 10 -t 3 http://localhost/php-framework-benchmark/laravel-5.4/public/index.php/hello/index
Concurrency Level: 10
Time taken for tests: 3.004 seconds
Complete requests: 1961
Failed requests: 0
Total transferred: 1995682 bytes
HTML transferred: 66708 bytes
Requests per second: 652.86 [#/sec] (mean)
Time per request: 15.317 [ms] (mean)
Time per request: 1.532 [ms] (mean, across all concurrent requests)
Transfer rate: 648.83 [Kbytes/sec] received
ããã¯ã詳现ã¯ããã§èŠã€ããããšãã§ããããŒãã¢ã©ã€ãæ¥ç¶ããŠããŸããã
ãããªãã¯Â«æ¥ç¶ïŒããŒãã¢ã©ã€ã»ãšã®èŠæäœããšãã«åãTCPæ¥ç¶ã䜿çšãããµãŒããŒã«åŸç¶ã®èŠæ±ãã ããã¯ãHTTPã®æ°žç¶çãªæ¥ç¶ãšåŒã°ããŠããŸãã ããã¯ããµãŒããŒåŽã§ã®æžå°CPUè² è·ã§å©ããšåŸ ã¡æé/å¿çæéãæ¹åããŸãã
èŠæ±ã«æ¥ç¶ïŒéãã»ã§äœãããŠããå Žåãããã¯ãèŠæ±ããªãããåŸããµãŒããŒãæ¥ç¶ãçµäºããå¿ èŠãããããšã瀺ããŠããŸãã ããã§ãèŠæ±ããšã«æ°ããTCPæ¥ç¶ã確ç«ãããŸãã
ããã©ã«ãHTTP 1.1ã®ã¯ã©ã€ã¢ã³ã/ãµãŒãçšéã¯ããŒãã¢ã©ã€ãã©ãHTTP 1.0ã¯ã©ã€ã¢ã³ã/ãµãŒããããŒãã¢ã©ã€ãããã©ã«ãã§ã¯ãµããŒããããŸãããããã
ãã®ããã«ãã¹ãªã è©Šéšã次ã®ããã«ãªããŸãã
ab -H 'Connection: close' -c 10 -t 3 http://localhost/php-framework-benchmark/slim-3.0/index.php/hello/index
Concurrency Level: 10
Time taken for tests: 3.000 seconds
Complete requests: 10709
Failed requests: 0
Total transferred: 2131091 bytes
HTML transferred: 353397 bytes
Requests per second: 3569.53 [#/sec] (mean)
Time per request: 2.801 [ms] (mean)
Time per request: 0.280 [ms] (mean, across all concurrent requests)
Transfer rate: 693.69 [Kbytes/sec] received
ãããã«
äºæ³ãããããã«ããã©ãŒãã³ã¹ã®èª°ããèªãããªãŒããŒïŒãªãéçºé床ïŒPhalconã§ãã æåã®PHPãã¬ãŒã ã¯ãŒã¯ - ïŒãã ãããœãŒã¹ã³ãŒãã¯PhalconæžãããŠããCãïŒã®éãšãå®éã«ã¯ - - 第äºäœã®CodeIgniterã¯3ãåããŸãïŒ
ãã¡ãããæã ã¯ãã®å楜åšãã®ç®çãå¿ããŠã¯ãªããŸããã ããªãã¯ãåçŽãªã¢ããªã±ãŒã·ã§ã³ãREST APIããå¥ã®äœããå°åã»è»œéãªãã¬ãŒã ã¯ãŒã¯ãéžæããŠããã®äžã«æžã蟌ã¿ããããšããŠããå Žåãæ©èœãæ¡åŒµããéã«ããããŠæãå¯èœæ§ã®é«ããããªãã¯åé¡ãçºçããŸãã ãããŠããã®é - ãã«æ©èœã®åé·æ§ã®ã倧èŠæš¡ãªãã¬ãŒã ã¯ãŒã¯ãããéãè² è·ã®äžã§åºæ¬çãªã¢ããªã±ãŒã·ã§ã³ã®ãã¹ãã£ã³ã°ãç¶æããããã®è²¡æ¿çã³ã¹ãã䌎ããŸãã
ãã®ãã¹ãã¯ãå®éã«å¢å ããããã©ãŒãã³ã¹ãç¥ãããããã«ãããŒãžã§ã³7.0ãšããªãã®å¿ã®äžããã³å°æ¥ã®ãããžã§ã¯ãã«7.1ã®ç«å Žã匷åããããã«/å ±æ/ PHPèšèªã説åŸããããã«è¡ãããŸããã
å éšããŒã¿æ§é ã®ãªãã¡ã¯ã¿ãªã³ã°ãããã³æœè±¡æ§ææšã®åœ¢ã§ã³ãŒããã³ã³ãã€ã«ããåã«ãè¿œå ã®ã¹ããããè¿œå ãã - æœè±¡æ§ææšïŒASTïŒã - åªããæ§èœãšããå¹ççãªã¡ã¢ãªå²ãåœãŠã«ã€ãªãã£ãŠããŸãã çµæèªäœã¯çŽæã瀺ããŠããŸãããã¹ãã¯ãå®éã®ã¢ããªã±ãŒã·ã§ã³ã§å®è¡PHPã¯äºåã®éPHP 5.6ã®ããã«ãå¹³åã§7ã§ããããšã瀺ããããã³äœ¿çšã50ïŒ ä»¥äžããHHVM JITã³ã³ãã€ã©ã®ããã®PHP 7匷åãªåè£ã«ãªããã¯ãšãªã®åŠçæéãäžã«ã¡ã¢ãªFacebookã®ã
ãã¹ãã¯å®å šã«èŠæ±RNR7ã®äºåç·æ¥åŠçã確èªããã¡ã¢ãªã®åæžéã¯ã䜿çšãããŸãã