Skip to content

Instantly share code, notes, and snippets.

@gondo
Forked from SchumacherFM/Magento-HHVM.md
Created August 17, 2013 03:15
Show Gist options
  • Select an option

  • Save gondo/6255074 to your computer and use it in GitHub Desktop.

Select an option

Save gondo/6255074 to your computer and use it in GitHub Desktop.

Revisions

  1. @SchumacherFM SchumacherFM revised this gist Aug 13, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -150,6 +150,10 @@ In both tests: PHP 5.4.16
    Conclusion
    ------

    Missing is a test where we rely on Redis, Percona, php-fpm + nginx.

    Also missing test: The HHVM should be put behind a nginx server and even here the cache should connect to Redis.

    Facebook is working hard on HHVM. A lot of commits take place every day!

    Big kudos to [https://twitter.com/daniel_sloof](https://twitter.com/daniel_sloof) for fixing HHVM errors related to Magento!
  2. @SchumacherFM SchumacherFM revised this gist Aug 12, 2013. 1 changed file with 54 additions and 77 deletions.
    131 changes: 54 additions & 77 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -82,20 +82,21 @@ Performance Test

    Multiple shift-reloads in the FF 23 browser in two tabs. Times are approximate.

    ```
    Request Type HHVM MAMP MAMP-APC [1]
    CMS Page 450ms 2.5s 820ms
    Category View [2] 980ms 4.6s 3.5s
    Product View [3] 500ms-1s 4.7s 3.1s
    Add to basket [4] 1.2-2.9s 8.8s 5.5s
    List basket [5] 2.1s 6.9s 3.8s
    List basket [6] 1s 5.5s 2.9s
    Checkout Onepage [7] 690ms 4.47s
    Onepage SaveBilling 236ms 2.3s
    Onepage SaveShipping 251ms 2.4s
    Onepage SavePayment 486ms 3.28s
    Onepage success 562ms 3.25s
    ```

    | Request Type | HHVM | MAMP | MAMP-APC [1] |
    | ------------- | -------------| ----- | -------------- |
    | CMS Page | 450ms | 2.5s | 820ms|
    | Category View [2] | 980ms | 4.6s| 3.5s|
    | Product View [3] | 500ms-1s| 4.7s| 3.1s|
    | Add to basket [4] | 1.2-2.9s| 8.8s| 5.5s|
    | List basket [5] | 2.1s| 6.9s| 3.8s|
    | List basket [6] | 1s | 5.5s| 2.9s|
    | Checkout Onepage [7] | 690ms | 4.47s||
    | Onepage SaveBilling | 236ms | 2.3s||
    | Onepage SaveShipping | 251ms | 2.4s||
    | Onepage SavePayment | 486ms | 3.28s||
    | Onepage success | 562ms | 3.25s||

    1. MAMP-APC runs with PHP 5.4.16
    2. containing 8 products
    3. configurable product with two options and one customer rating
    @@ -106,69 +107,45 @@ Onepage success 562ms 3.25s

    #### ab -n 20 -c 5

    ##### Product View: MAMP-APC

    ```
    Concurrency Level: 5
    Time taken for tests: 23.229 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2202440 bytes
    HTML transferred: 2193600 bytes
    Requests per second: 0.86 #/sec mean
    Time per request: 5807.239 ms mean
    Time per request: 1161.448 ms mean, across all concurrent requests
    Transfer rate: 92.59 Kbytes/sec received
    ```

    ##### Product View: HHVM

    ```
    Concurrency Level: 5
    Time taken for tests: 7.334 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2244160 bytes
    HTML transferred: 2235640 bytes
    Requests per second: 2.73 #/sec mean
    Time per request: 1833.474 ms mean
    Time per request: 366.695 ms mean, across all concurrent requests
    Transfer rate: 298.83 Kbytes/sec received
    ```

    ##### Category View: MAMP-APC

    ```
    oncurrency Level: 5
    Time taken for tests: 36.452 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2002620 bytes
    HTML transferred: 1993780 bytes
    Requests per second: 0.55 [#/sec] (mean)
    Time per request: 9113.064 [ms] (mean)
    Time per request: 1822.613 [ms] (mean, across all concurrent requests)
    Transfer rate: 53.65 [Kbytes/sec] received
    ```

    ##### Category View: HHVM

    ```
    Concurrency Level: 5
    Time taken for tests: 12.996 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2118440 bytes
    HTML transferred: 2109920 bytes
    Requests per second: 1.54 [#/sec] (mean)
    Time per request: 3249.110 [ms] (mean)
    Time per request: 649.822 [ms] (mean, across all concurrent requests)
    Transfer rate: 159.18 [Kbytes/sec] received
    ```
    In both tests: PHP 5.4.16

    ##### Product View

    | Type | MAMP-APC | HHVM |
    | ------------- | -------------| ----- |
    | Concurrency Level | 5 | 5 |
    | Time taken for tests | 23.229s | 7.334s |
    |Complete requests|20|20|
    |Failed requests| 0|0|
    |Write errors| 0|0|
    |Total bytes transferred| 2202440 |2244160|
    |HTML bytes transferred| 2193600 |2235640|
    |Requests per second| 0.86 #/sec mean|2.73 #/sec mean|
    |Time per request| 5807.239 ms mean|1833.474 ms mean|
    |Time per request (1)| 1161.448 ms|366.695 ms|
    |Transfer rate| 92.59 Kbytes/sec received|298.83 Kbytes/sec received|

    (1) mean, across all concurrent requests


    ##### Category View

    | Type | MAMP-APC | HHVM |
    | ------------- | -------------| ----- |
    | Concurrency Level | 5 | 5 |
    | Time taken for tests | 36.298 | 13.682s |
    |Complete requests|20|20|
    |Failed requests| 0|0|
    |Write errors| 0|0|
    |Total bytes transferred| 2002620 |2118440|
    |HTML bytes transferred| 1993780 |2109920|
    |Requests per second| 0.55 #/sec mean|1.46 #/sec mean|
    |Time per request| 9074.451 ms mean|3420.546 ms mean|
    |Time per request (1)| 1814.890 ms|684.109 ms|
    |Transfer rate| 53.88 Kbytes/sec received|151.20 Kbytes/sec received|

    (1) mean, across all concurrent requests


    Conclusion
    ------
  3. @SchumacherFM SchumacherFM revised this gist Aug 12, 2013. 1 changed file with 39 additions and 4 deletions.
    43 changes: 39 additions & 4 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -108,7 +108,8 @@ Onepage success 562ms 3.25s

    ##### Product View: MAMP-APC

    ```Concurrency Level: 5
    ```
    Concurrency Level: 5
    Time taken for tests: 23.229 seconds
    Complete requests: 20
    Failed requests: 0
    @@ -118,11 +119,13 @@ HTML transferred: 2193600 bytes
    Requests per second: 0.86 #/sec mean
    Time per request: 5807.239 ms mean
    Time per request: 1161.448 ms mean, across all concurrent requests
    Transfer rate: 92.59 Kbytes/sec received```
    Transfer rate: 92.59 Kbytes/sec received
    ```

    ##### Product View: HHVM

    ```Concurrency Level: 5
    ```
    Concurrency Level: 5
    Time taken for tests: 7.334 seconds
    Complete requests: 20
    Failed requests: 0
    @@ -132,8 +135,40 @@ HTML transferred: 2235640 bytes
    Requests per second: 2.73 #/sec mean
    Time per request: 1833.474 ms mean
    Time per request: 366.695 ms mean, across all concurrent requests
    Transfer rate: 298.83 Kbytes/sec received```
    Transfer rate: 298.83 Kbytes/sec received
    ```

    ##### Category View: MAMP-APC

    ```
    oncurrency Level: 5
    Time taken for tests: 36.452 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2002620 bytes
    HTML transferred: 1993780 bytes
    Requests per second: 0.55 [#/sec] (mean)
    Time per request: 9113.064 [ms] (mean)
    Time per request: 1822.613 [ms] (mean, across all concurrent requests)
    Transfer rate: 53.65 [Kbytes/sec] received
    ```

    ##### Category View: HHVM

    ```
    Concurrency Level: 5
    Time taken for tests: 12.996 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2118440 bytes
    HTML transferred: 2109920 bytes
    Requests per second: 1.54 [#/sec] (mean)
    Time per request: 3249.110 [ms] (mean)
    Time per request: 649.822 [ms] (mean, across all concurrent requests)
    Transfer rate: 159.18 [Kbytes/sec] received
    ```

    Conclusion
    ------
  4. @SchumacherFM SchumacherFM revised this gist Aug 12, 2013. 1 changed file with 9 additions and 5 deletions.
    14 changes: 9 additions & 5 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -106,9 +106,9 @@ Onepage success 562ms 3.25s

    #### ab -n 20 -c 5

    |Type|MAMP-APC | HHVM|
    | --- | --- | --- |
    | Product View |```Concurrency Level: 5
    ##### Product View: MAMP-APC

    ```Concurrency Level: 5
    Time taken for tests: 23.229 seconds
    Complete requests: 20
    Failed requests: 0
    @@ -118,7 +118,11 @@ HTML transferred: 2193600 bytes
    Requests per second: 0.86 #/sec mean
    Time per request: 5807.239 ms mean
    Time per request: 1161.448 ms mean, across all concurrent requests
    Transfer rate: 92.59 Kbytes/sec received```|```Concurrency Level: 5
    Transfer rate: 92.59 Kbytes/sec received```
    ##### Product View: HHVM
    ```Concurrency Level: 5
    Time taken for tests: 7.334 seconds
    Complete requests: 20
    Failed requests: 0
    @@ -128,7 +132,7 @@ HTML transferred: 2235640 bytes
    Requests per second: 2.73 #/sec mean
    Time per request: 1833.474 ms mean
    Time per request: 366.695 ms mean, across all concurrent requests
    Transfer rate: 298.83 Kbytes/sec received```|
    Transfer rate: 298.83 Kbytes/sec received```
    Conclusion
  5. @SchumacherFM SchumacherFM revised this gist Aug 12, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -108,7 +108,7 @@ Onepage success 562ms 3.25s

    |Type|MAMP-APC | HHVM|
    | --- | --- | --- |
    | Product View |`Concurrency Level: 5
    | Product View |```Concurrency Level: 5
    Time taken for tests: 23.229 seconds
    Complete requests: 20
    Failed requests: 0
    @@ -118,7 +118,7 @@ HTML transferred: 2193600 bytes
    Requests per second: 0.86 #/sec mean
    Time per request: 5807.239 ms mean
    Time per request: 1161.448 ms mean, across all concurrent requests
    Transfer rate: 92.59 Kbytes/sec received`|`Concurrency Level: 5
    Transfer rate: 92.59 Kbytes/sec received```|```Concurrency Level: 5
    Time taken for tests: 7.334 seconds
    Complete requests: 20
    Failed requests: 0
    @@ -128,7 +128,7 @@ HTML transferred: 2235640 bytes
    Requests per second: 2.73 #/sec mean
    Time per request: 1833.474 ms mean
    Time per request: 366.695 ms mean, across all concurrent requests
    Transfer rate: 298.83 Kbytes/sec received`|
    Transfer rate: 298.83 Kbytes/sec received```|


    Conclusion
  6. @SchumacherFM SchumacherFM revised this gist Aug 12, 2013. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -106,29 +106,29 @@ Onepage success 562ms 3.25s

    #### ab -n 20 -c 5

    |MAMP-APC | HHVM|
    |--- | ---|
    |`Concurrency Level: 5
    |Type|MAMP-APC | HHVM|
    | --- | --- | --- |
    | Product View |`Concurrency Level: 5
    Time taken for tests: 23.229 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2202440 bytes
    HTML transferred: 2193600 bytes
    Requests per second: 0.86 [#/sec] (mean)
    Time per request: 5807.239 [ms] (mean)
    Time per request: 1161.448 [ms] (mean, across all concurrent requests)
    Transfer rate: 92.59 [Kbytes/sec] received`|`Concurrency Level: 5
    Requests per second: 0.86 #/sec mean
    Time per request: 5807.239 ms mean
    Time per request: 1161.448 ms mean, across all concurrent requests
    Transfer rate: 92.59 Kbytes/sec received`|`Concurrency Level: 5
    Time taken for tests: 7.334 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2244160 bytes
    HTML transferred: 2235640 bytes
    Requests per second: 2.73 [#/sec] (mean)
    Time per request: 1833.474 [ms] (mean)
    Time per request: 366.695 [ms] (mean, across all concurrent requests)
    Transfer rate: 298.83 [Kbytes/sec] received`|
    Requests per second: 2.73 #/sec mean
    Time per request: 1833.474 ms mean
    Time per request: 366.695 ms mean, across all concurrent requests
    Transfer rate: 298.83 Kbytes/sec received`|


    Conclusion
  7. @SchumacherFM SchumacherFM revised this gist Aug 12, 2013. 1 changed file with 32 additions and 8 deletions.
    40 changes: 32 additions & 8 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -83,28 +83,52 @@ Performance Test
    Multiple shift-reloads in the FF 23 browser in two tabs. Times are approximate.

    ```
    Request Type HHVM MAMP MAMP-APC [1] MAMP 5.5
    Request Type HHVM MAMP MAMP-APC [1]
    CMS Page 450ms 2.5s 820ms
    Category View [2] 980ms 4.6s 2.5s
    Product View [3] 500ms-1s 4.7s 2.1s
    Add to basket [4] 1.2-2.9s 8.8s
    List basket [5] 2.1s 6.9s
    List basket [6] 1s 5.5s
    Category View [2] 980ms 4.6s 3.5s
    Product View [3] 500ms-1s 4.7s 3.1s
    Add to basket [4] 1.2-2.9s 8.8s 5.5s
    List basket [5] 2.1s 6.9s 3.8s
    List basket [6] 1s 5.5s 2.9s
    Checkout Onepage [7] 690ms 4.47s
    Onepage SaveBilling 236ms 2.3s
    Onepage SaveShipping 251ms 2.4s
    Onepage SavePayment 486ms 3.28s
    Onepage success 562ms 3.25s
    ```
    1. MAMP-APC runs with PHP 5.4.10
    1. MAMP-APC runs with PHP 5.4.16
    2. containing 8 products
    3. configurable product with two options and one customer rating
    4. POST to cart with redirect to product view and listing cart content
    5. First call of the basket page
    6. Reloads
    7. Initial load of the page checkout/onepage after that normal checkout process


    #### ab -n 20 -c 5

    |MAMP-APC | HHVM|
    |--- | ---|
    |`Concurrency Level: 5
    Time taken for tests: 23.229 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2202440 bytes
    HTML transferred: 2193600 bytes
    Requests per second: 0.86 [#/sec] (mean)
    Time per request: 5807.239 [ms] (mean)
    Time per request: 1161.448 [ms] (mean, across all concurrent requests)
    Transfer rate: 92.59 [Kbytes/sec] received`|`Concurrency Level: 5
    Time taken for tests: 7.334 seconds
    Complete requests: 20
    Failed requests: 0
    Write errors: 0
    Total transferred: 2244160 bytes
    HTML transferred: 2235640 bytes
    Requests per second: 2.73 [#/sec] (mean)
    Time per request: 1833.474 [ms] (mean)
    Time per request: 366.695 [ms] (mean, across all concurrent requests)
    Transfer rate: 298.83 [Kbytes/sec] received`|


    Conclusion
  8. @SchumacherFM SchumacherFM revised this gist Aug 12, 2013. 1 changed file with 18 additions and 14 deletions.
    32 changes: 18 additions & 14 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -83,25 +83,29 @@ Performance Test
    Multiple shift-reloads in the FF 23 browser in two tabs. Times are approximate.

    ```
    Request Type HHVM MAMP
    CMS Page 450ms 2.5s
    Category View [1] 980ms 4.6s
    Product View [2] 500ms-1s 4.7s
    Add to basket [3] 1.2-2.9s 8.8s
    List basket [4] 2.1s 6.9s
    List basket [5] 1s 5.5s
    Checkout Onepage [6] 690ms 4.47s
    Request Type HHVM MAMP MAMP-APC [1] MAMP 5.5
    CMS Page 450ms 2.5s 820ms
    Category View [2] 980ms 4.6s 2.5s
    Product View [3] 500ms-1s 4.7s 2.1s
    Add to basket [4] 1.2-2.9s 8.8s
    List basket [5] 2.1s 6.9s
    List basket [6] 1s 5.5s
    Checkout Onepage [7] 690ms 4.47s
    Onepage SaveBilling 236ms 2.3s
    Onepage SaveShipping 251ms 2.4s
    Onepage SavePayment 486ms 3.28s
    Onepage success 562ms 3.25s
    ```
    1. containing 8 products
    2. configurable product with two options and one customer rating
    3. POST to cart with redirect to product view and listing cart content
    4. First call of the basket page
    5. Reloads
    6. Initial load of the page checkout/onepage after that normal checkout process
    1. MAMP-APC runs with PHP 5.4.10
    2. containing 8 products
    3. configurable product with two options and one customer rating
    4. POST to cart with redirect to product view and listing cart content
    5. First call of the basket page
    6. Reloads
    7. Initial load of the page checkout/onepage after that normal checkout process




    Conclusion
    ------
  9. @SchumacherFM SchumacherFM revised this gist Aug 11, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ VB with fresh pulled HHVM sources with MySQL 5.5

    ### Magento

    I ran here a big customized Magento EE store from a big Swiss scout store. A lot of custom price rules for many different groups and some fancy discount types.
    I ran here a big customized Magento EE 1.12 store from a big Swiss scout store. A lot of custom price rules for many different groups and some fancy discount types.

    URL schema is different from the official demo store: `www.customer.ch/[de|fr]/index.php` to map automatically different languages.

  10. @SchumacherFM SchumacherFM revised this gist Aug 11, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -30,13 +30,13 @@ Magento Cache activated. MySQL database slightly optimized via mysqltuner.pl
    - 4 store views
    - FPC disabled

    Magento EE sources has been imported into the VM. Not via shared folders or NFS. There were previously some wired long request times with HHVM when using shared folders.
    Magento EE sources has been imported into the VM. Not via shared folders or NFS. There were previously some weird long request times with HHVM when using shared folders.


    Compile and Download HipHop
    ---

    Use can use that install script `install-hhvm.sh` for compiling and installing hiphop [https://github.com/jakoch/php-hhvm](https://github.com/jakoch/php-hhvm).
    You can use the install script `install-hhvm.sh` for compiling and installing hiphop [https://github.com/jakoch/php-hhvm](https://github.com/jakoch/php-hhvm).

    But change the hiphop source in function `get_hiphop_source()` to the special Magento hiphop [https://github.com/danslo/hiphop-php](https://github.com/danslo/hiphop-php) source.

    @@ -73,7 +73,7 @@ Not every category will work but 98% of them.

    Not possible due to HHVM shows this error:

    `Notice: Undefined index: 0 in /var/www/customer-dev/site/app/code/core/Mage/Catalog/Model/Layer/Filter/Price/Algorithm.php on line 368`
    _Notice: Undefined index: 0 in /var/www/customer-dev/site/app/code/core/Mage/Catalog/Model/Layer/Filter/Price/Algorithm.php on line 368_

    There is something weird in our code base, not in HHVM.

  11. @SchumacherFM SchumacherFM revised this gist Aug 11, 2013. 1 changed file with 50 additions and 16 deletions.
    66 changes: 50 additions & 16 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -4,11 +4,23 @@ Running Magento Enterprise Edition with Facebook HipHop HHVM
    Prerequisites
    ----

    I ran a big customized Magento EE store from a big Swiss scout store.
    ### Hardware

    URL schema is different that from the official demo store: `www.customer.ch/[de|fr]/index.php` to map automatically different languages.
    MacBook Air (MBA) Mid 2012

    Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-23-generic x86_64) in a virtualbox via vagrant.
    Virtualbox (VB): Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-23-generic x86_64) via vagrant.

    ### Software

    MBA with Apache 2 with mod_php Version 5.3.19 with MySQL 5.5 (MAMP)

    VB with fresh pulled HHVM sources with MySQL 5.5

    ### Magento

    I ran here a big customized Magento EE store from a big Swiss scout store. A lot of custom price rules for many different groups and some fancy discount types.

    URL schema is different from the official demo store: `www.customer.ch/[de|fr]/index.php` to map automatically different languages.

    Magento Cache activated. MySQL database slightly optimized via mysqltuner.pl

    @@ -18,7 +30,7 @@ Magento Cache activated. MySQL database slightly optimized via mysqltuner.pl
    - 4 store views
    - FPC disabled

    Magento EE sources has been imported into the VM. Not via shared folders or NFS.
    Magento EE sources has been imported into the VM. Not via shared folders or NFS. There were previously some wired long request times with HHVM when using shared folders.


    Compile and Download HipHop
    @@ -53,27 +65,49 @@ Fixes:

    Unfixable:

    - There are also some errors in the `site/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 441` but that results from strange code in phtml files ...
    - There are also some errors in the `site/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 441` but that results from strange code in phtml files ... 8-)

    Therefore I could test all except some product list categories.
    Not every category will work but 98% of them.

    #### Search

    Not possible due to HHVM shows this error:

    `Notice: Undefined index: 0 in /var/www/customer-dev/site/app/code/core/Mage/Catalog/Model/Layer/Filter/Price/Algorithm.php on line 368`

    There is something weird in our code base, not in HHVM.

    Performance Test
    ----------

    Running both tests (hhvm in the vagrant box and Apache with mod_php on my Mac) on my MacBook Air Mid 2012. Multiple requests
    Multiple shift-reloads in the FF 23 browser in two tabs. Times are approximate.

    ```
    Request Type HHVM Apache
    CMS Page ~450ms ~2.5s
    Category View[1] ~980ms ~4.6s
    Product View [2] ~1.01s ~4.7s
    Add to basket [3] ~2.98s ~8.8s
    Request Type HHVM MAMP
    CMS Page 450ms 2.5s
    Category View [1] 980ms 4.6s
    Product View [2] 500ms-1s 4.7s
    Add to basket [3] 1.2-2.9s 8.8s
    List basket [4] 2.1s 6.9s
    List basket [5] 1s 5.5s
    Checkout Onepage [6] 690ms 4.47s
    Onepage SaveBilling 236ms 2.3s
    Onepage SaveShipping 251ms 2.4s
    Onepage SavePayment 486ms 3.28s
    Onepage success 562ms 3.25s
    ```
    [1] containing 8 products
    1. containing 8 products
    2. configurable product with two options and one customer rating
    3. POST to cart with redirect to product view and listing cart content
    4. First call of the basket page
    5. Reloads
    6. Initial load of the page checkout/onepage after that normal checkout process

    [2] configurable product with two options and one customer rating
    Conclusion
    ------

    [3] POST to cart with redirect to product view and listing cart content
    Facebook is working hard on HHVM. A lot of commits take place every day!

    Big kudos to [https://twitter.com/daniel_sloof](https://twitter.com/daniel_sloof) for fixing HHVM errors related to Magento!

    That would be one future for PHP.
  12. @SchumacherFM SchumacherFM revised this gist Aug 11, 2013. 1 changed file with 22 additions and 1 deletion.
    23 changes: 22 additions & 1 deletion Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -16,9 +16,11 @@ Magento Cache activated. MySQL database slightly optimized via mysqltuner.pl
    - 237 categories
    - 48.000 url rewrites
    - 4 store views
    - FPC disabled

    Magento EE sources has been imported into the VM. Not via shared folders or NFS.


    Compile and Download HipHop
    ---

    @@ -39,6 +41,8 @@ Options for the config.hdf file: [https://github.com/facebook/hiphop-php/blob/ma

    Please see the to this gist attached file `hhvm.hdf`.

    Buggy is the PHP_SELF and SCRIPT_NAME which will not be properly set therefore hardcoded. Also the rewrite rules can be more optimized.

    Magento Errors
    ------------
    I'm not quite sure if that is still a problem with SimpleXML or with buggy Magento code.
    @@ -51,8 +55,25 @@ Unfixable:

    - There are also some errors in the `site/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 441` but that results from strange code in phtml files ...

    Therefore I could test all except displaying product list.
    Therefore I could test all except some product list categories.

    Performance Test
    ----------

    Running both tests (hhvm in the vagrant box and Apache with mod_php on my Mac) on my MacBook Air Mid 2012. Multiple requests

    ```
    Request Type HHVM Apache
    CMS Page ~450ms ~2.5s
    Category View[1] ~980ms ~4.6s
    Product View [2] ~1.01s ~4.7s
    Add to basket [3] ~2.98s ~8.8s
    ```
    [1] containing 8 products

    [2] configurable product with two options and one customer rating

    [3] POST to cart with redirect to product view and listing cart content


  13. @SchumacherFM SchumacherFM revised this gist Aug 11, 2013. 2 changed files with 87 additions and 0 deletions.
    80 changes: 80 additions & 0 deletions hhvm.hdf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,80 @@
    PidFile = /tmp/hhvm.pid
    Server {
    Port = 8080
    SourceRoot = /var/www/customer/site
    # DefaultDocument = index.php
    }
    AdminServer {
    Port = 8088
    ThreadCount = 1
    Password =
    }
    Eval {
    Jit = true
    }
    Log {
    NoSilencer = true
    Header = true
    Level = Verbose
    UseLogFile = true
    AlwaysLogUnhandledExceptions = true
    RuntimeErrorReportingLevel = 8191
    File = /var/log/hhvm/error.log
    Access {
    * {
    File = /var/log/hhvm/access.log
    Format = %h %l %u %t \"%r\" %>s %b
    }
    }
    }

    VirtualHost {
    * {
    Prefix = customer.local
    ServerVariables {
    MAGE_IS_DEVELOPER_MODE = true
    MAGE_RUN_CODE = customer_de
    MAGE_RUN_TYPE = store
    PHP_SELF = /de/index.php
    SCRIPT_NAME = /de/index.php
    }
    RewriteRules {
    dirindex {
    pattern = ^/(de|fr)/(.*)
    to = $1/index.php/$2
    qsa = true
    conditions {
    * {
    pattern = \.(css|js|jpg|png|gif)$
    negate = true
    }
    }
    }
    }
    }
    }

    StaticFile {
    FilesMatch {
    * {
    pattern = .*\.(dll|exe)
    headers {
    * = Content-Disposition: attachment
    }
    }
    }
    Extensions {
    woff = application/x-font-woff
    js = text/javascript
    css = text/css
    gif = image/gif
    html = text/html
    jpe = image/jpeg
    jpeg = image/jpeg
    jpg = image/jpeg
    png = image/png
    tif = image/tiff
    tiff = image/tiff
    txt = text/plain
    }
    }
    7 changes: 7 additions & 0 deletions hhvmstart.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/bash
    hhvm --user vagrant -c /var/www/customer/hhvm.hdf --mode daemon

    # to analyze
    # find /var/www/customer/site -name '*.php' -o -name '*.phtml' > /tmp/customer_files.txt
    # find /var/www/customer/site -name '*.php' > /tmp/customer_files.txt
    # hhvm --hphp -t analyze --gen-stats=1 --keep-tempdir=1 --input-list /tmp/customer_files.txt --output-dir=/tmp/hphp
  14. @SchumacherFM SchumacherFM revised this gist Aug 11, 2013. 1 changed file with 40 additions and 2 deletions.
    42 changes: 40 additions & 2 deletions Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,27 @@
    Running Magento Enterprise Edition with Facebook HipHop HHVM
    ===

    Prerequisites
    ----

    I ran a big customized Magento EE store from a big Swiss scout store.

    URL schema is different that from the official demo store: `www.customer.ch/[de|fr]/index.php` to map automatically different languages.

    Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-23-generic x86_64) in a virtualbox via vagrant.

    Magento Cache activated. MySQL database slightly optimized via mysqltuner.pl

    - 5000 SKUs
    - 237 categories
    - 48.000 url rewrites
    - 4 store views

    Magento EE sources has been imported into the VM. Not via shared folders or NFS.

    Compile and Download HipHop
    ---

    Setup a virtual machine.

    Use can use that install script `install-hhvm.sh` for compiling and installing hiphop [https://github.com/jakoch/php-hhvm](https://github.com/jakoch/php-hhvm).

    But change the hiphop source in function `get_hiphop_source()` to the special Magento hiphop [https://github.com/danslo/hiphop-php](https://github.com/danslo/hiphop-php) source.
    @@ -16,5 +32,27 @@ Official FB "How to" compile: [https://github.com/facebook/hiphop-php/wiki](http

    Prebuild packages will not work with Magento.

    HHVM config.hdf
    -----

    Options for the config.hdf file: [https://github.com/facebook/hiphop-php/blob/master/hphp/doc/options.compiled](https://github.com/facebook/hiphop-php/blob/master/hphp/doc/options.compiled)

    Please see the to this gist attached file `hhvm.hdf`.

    Magento Errors
    ------------
    I'm not quite sure if that is still a problem with SimpleXML or with buggy Magento code.

    Fixes:

    - File `site/app/code/core/Mage/Core/Block/Template/Facade.php` every: `$key = (string)$key;`

    Unfixable:

    - There are also some errors in the `site/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 441` but that results from strange code in phtml files ...

    Therefore I could test all except displaying product list.




  15. @SchumacherFM SchumacherFM revised this gist Aug 11, 2013. 1 changed file with 20 additions and 1 deletion.
    21 changes: 20 additions & 1 deletion Magento-HHVM.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,20 @@
    # Running Magento Enterprise Edition with Facebook HipHop HHVM
    Running Magento Enterprise Edition with Facebook HipHop HHVM
    ===

    Compile and Download HipHop
    ---

    Setup a virtual machine.

    Use can use that install script `install-hhvm.sh` for compiling and installing hiphop [https://github.com/jakoch/php-hhvm](https://github.com/jakoch/php-hhvm).

    But change the hiphop source in function `get_hiphop_source()` to the special Magento hiphop [https://github.com/danslo/hiphop-php](https://github.com/danslo/hiphop-php) source.

    Optionally: You can remove all the last lines after `## Success` in the script `install-hhvm.sh`.

    Official FB "How to" compile: [https://github.com/facebook/hiphop-php/wiki](https://github.com/facebook/hiphop-php/wiki)

    Prebuild packages will not work with Magento.

    Options for the config.hdf file: [https://github.com/facebook/hiphop-php/blob/master/hphp/doc/options.compiled](https://github.com/facebook/hiphop-php/blob/master/hphp/doc/options.compiled)

  16. @SchumacherFM SchumacherFM renamed this gist Aug 11, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  17. @SchumacherFM SchumacherFM created this gist Aug 11, 2013.
    1 change: 1 addition & 0 deletions Magento-HHVM
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    # Running Magento Enterprise Edition with Facebook HipHop HHVM