O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

體驗 Hhvm

2.503 visualizações

Publicada em

Laravel 台灣 歡慶翻譯里程碑@創業酒吧 - 2014/10/4
在活動中舉行的小講題《體驗HHVM》。

Publicada em: Software
  • Seja o primeiro a comentar

體驗 Hhvm

  1. 1. 體驗HHVM chengwei @ Laravel 台灣 (2014.10.4)
  2. 2. 內容概要 ! ‧HHVM 概述 ‧Laravel Homestead + HHVM ‧HHVM 成效 ‧HHVM 安裝 (ubuntu)
  3. 3. ! 陳正瑋 @ 得寬科技 DevOps ! 一步一步的往DevOps之路前進...
  4. 4. What is HHVM ? ‧ http://zh.wikipedia.org/wiki/ HipHop_for_PHP ‧ http://hhvm.com/ ‧ https://www.facebook.com/hhvm ‧ https://github.com/facebook/hhvm ‧ HHVM, the new PHP? https://www.youtube.com/watch? v=fxHEuOXdCP0 ‧ HHVM: the alternative PHP Runtime https://www.youtube.com/watch? v=P9WhAUpMFdg more …
  5. 5. HipHop for PHP ! 來自於FACEBOOK ! HPHPc → HPHPi → HHVM ! HPHPc 靜態編譯,將php轉為C++ ! HPHPi = HipHop interpreter ! HHVM 是以 HPHPi 為基礎,應用JIT技術 更多技術細節,請洽Google⼤大神
  6. 6. HHVM ! Just-in-time PHP compiler 更多技術細節,請洽Google⼤大神
  7. 7. HHVM ! It is a different PHP runtime 更多技術細節,請洽Google⼤大神
  8. 8. Nginx php-fpm mysql index.php
  9. 9. Nginx HHVM mysql index.php
  10. 10. 重點前⾯面都不重要,真正的
  11. 11. Real World Apps - Benchmarks (requests per second) Source: Zeev Suraski http://zsuraski.blogspot.tw/2014/07/benchmarking-phpng.html 300 225 150 75 0 SugarCRM CE 6.5.16 - login page Wordpress 3.9 Drupal 7.28 homepage PHP 5.4 (no OPcache) PHP 5.5 PHP 5.6 hhvm 3.1 (prebuilt binaries) PHPNG
  12. 12. Laravel + HHVM
  13. 13. Laravel Homestead ! official, pre-packaged Vagrant "box"
  14. 14. Laravel Homestead Included Software Homestead v0.1.9 ‧ Ubuntu 14.04 ‧ PHP 5.6 ‧ HHVM ‧ Nginx ‧ MySQL ‧ Postgres ‧ Node ‧ Redis ‧ Memcached ‧ Beanstalkd ‧ Laravel Envoy ‧ Fabric + HipChat Extension
  15. 15. Before Installation ! VitualBox https://www.virtualbox.org/wiki/Downloads ! Vagrant http://www.vagrantup.com/downloads.html VirtualBox
  16. 16. Installation & Setup ! http://laravel.tw/docs/homestead#installation-and-setup ! http://laravel.com/docs/4.2/homestead#installation-and-setup ! https://github.com/laravel/homestead
  17. 17. DEMO - Homestead: Installation http://youtu.be/shrMHTk4RvY
  18. 18. DEMO - Homestead: Setup yaml http://youtu.be/q4Z0DNulPUQ
  19. 19. DEMO - Homestead: Setup yaml (HHVM) http://youtu.be/B7n21DWXZ4k
  20. 20. nginx.conf : php-fpm nginx.conf : HHVM
  21. 21. HHVM 成效 ! “自從用了 HHVM ,程式跑超快的,Server 的 數量越來越少,老闆的心情越來越好,看來加薪 升職的日子指日可待。 ” ! ~ 某超級不負責任之江湖傳言
  22. 22. Tools ! Anbu Profiler for Laravel PHP https://github.com/daylerees/anbu ! laravel-debugbar https://github.com/barryvdh/laravel-debugbar ! The Computer Language Benchmarks Game http://benchmarksgame.alioth.debian.org/u32/program.php? test=nbody&lang=php&id=3 ! ab - Apache HTTP server benchmarking tool http://httpd.apache.org/docs/2.2/programs/ab.html
  23. 23. LIVE DEMO Round:1 Homestead: php-fpm vs HHVM
  24. 24. 測試數據 php-fpm HHVM
  25. 25. LIVE DEMO Round:2 Cloud hosting: php-fpm vs HHVM
  26. 26. 測試數據 php-fpm HHVM
  27. 27. 測試數據 (ab) php-fpm nginx + php-fpm + Wordpress
  28. 28. 測試數據 (ab) HHVM nginx + HHVM + Wordpress
  29. 29. HHVM 安裝 ( ubuntu 14.04 ) ! 詳細步驟可參閱 http://fideloper.com/hhvm-nginx-laravel
  30. 30. DEMO - ubuntu: install HHVM http://youtu.be/3OTr1umhl9U
  31. 31. 總結 ! ‧Homestead 對於開發者的便利性 ‧HHVM 的發展值得關注 ‧HHVM 需要更多測試與調教

×