1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HHVM Support for Xenforo

Discussion in 'General XenForo Discussion and Feedback' started by srlee, Jul 18, 2015.

  1. srlee

    srlee Member

    I see that the latest post on HHVM for Xenforo is 2014 and both have come a long way since then. Does anyone know if this is supported with Xenforo?
     
  2. Tracy Perry

    Tracy Perry Well-Known Member

    Some people tried it.. but there hasn't been a huge concern for doing it from what I've seen as PHP 7 is supposed to perform similarly last I read.
     
    SneakyDave likes this.
  3. Alteran Ancient

    Alteran Ancient Well-Known Member

    I gave it a try. I would get an "Array to string conversion" error and then HHVM would segfault and die to the point where you would have to go and restart it.

    That was a quite a while ago, so there might be a better outlook now that HHVM is on version 3.8. I wouldn't hold your hopes up too much, though.
     
  4. dngad

    dngad New Member

    Yeah HHVM isnt fully supported, I have noticed HHVM starting to take up 100% usage, meanwhile my wordpress site works amazingly fast with HHVM.

    Perhaps it's time xenforo optimizes itself for HHVM?

    And no, php7 isnt quite as fast as hhvm still. Statistics have revealed php7 to be lagging behind by about 18~40% compared to HHVM.

    Kindly consider supporting HHVM and I'm certain xenforo will get the attention of speed enthusiasts
     
  5. Tracy Perry

    Tracy Perry Well-Known Member

    But there is to much "tweaking" required for HHVM.. even with other setups. As my daddy used to say.. to much sugar for a nickel.
     
  6. DroidOne

    DroidOne Well-Known Member

    What statistics? I would be quite surprised if PHP 7 lagged behind HHVM by 40% running XF. In some of the benchmarks here PHP 7 even outperforms HHVM (Drupal 8, phpBB, OpenCart, Traq): PHP (March 2015). HHVM is about ~12% faster for WP 4.1.

    I guess we can't say for sure until someone does some proper testing. PHP 7 might even perform better than HHVM - who knows :)
     
    Last edited: Jul 22, 2015
  7. Tracy Perry

    Tracy Perry Well-Known Member

    The ones I saw were done by... tada.. facebook dev's.
     
    Mr. Goodie2Shoes and DroidOne like this.
  8. Xon

    Xon Well-Known Member

    How XenForo creates templates and populates templates variables, is probably one of the worst things todo. It forces HHVM to invalidate a lot of assumptions which it uses to generate fast code.
     
  9. dngad

    dngad New Member

    Not sure if you remain up-to-date but HHVM 3.9.0 is out on nightly with massive performance upgrades and far exceeds the performance of php7 by over 50%. I have tested various platforms myself including wordpress and many other softwares.
    On top of this, JIT is generally found to perform even faster than C in synthetic benchmarks and php7's team had tweeted that they aren't looking into adding JIT anytime in the future because of their lack of time in their normal lives.

    But yeah hhvm comes with a lot less extensions comparably. I tested php 7 beta 2 so I don't know if something will change in the coming builds. So far though, HHVM beats php 7 by a huge margin.
     
  10. Rob

    Rob Well-Known Member

    Has anyone actually documented where specifically XenForo falls over on hhvm?
     
  11. md_5

    md_5 Well-Known Member

    Not on any recent version as far as I know.
     
  12. md_5

    md_5 Well-Known Member

    Just whacked up a test instance of HHVM on Debian Jessie (HHVM 3.8.0). Can't see any obvious issues. Only using the resource manager + normal xenforo.

    EDIT:
    Seems cold page compile time is gigantic, probably because of the massive class hierachy / loading in XenForo. Running a i7 4770k on my desktop and compiling a route for the first page load takes 5+ seconds of spinning CPU. After that it's quick, but not sure a large site would like it after a server restart.

    EDIT 2:
    Seems HHVM actually stores the JIT cache on disk, so this wouldn't really be an issue in practice. Fancy!
     
    Last edited: Jul 24, 2015
  13. md_5

    md_5 Well-Known Member

    Just whacked it up on the production site.
    Home page / ACP loaded, then the site completely fell over, presumably from the rapid JIT load.

    Back to php5-fpm.
     
    jflory7 and danjb like this.
  14. Mike

    Mike XenForo Developer Staff Member

  15. md_5

    md_5 Well-Known Member

    Yeah we've just been discussing this, the crux of the issue is that ZendFramework + XenForo is a gigantic thing for the JIT to go through. You can also supposedly manually create a HipHop precompile of all your php files, maybe I'll try that. Result would probably be very large, even more so because that approach would compile even the unused php stuffs.
     
  16. dngad

    dngad New Member

    Exactly lol. Things just fall apart, 100% CPU usage. It's not pretty compared to what I experience with my wordpress running on HHVM...
     
    Xon and md_5 like this.
  17. md_5

    md_5 Well-Known Member

    Yeah PHP 7 here we come I guess.
     
    Xon likes this.
  18. Nuno

    Nuno Active Member

    I tested HHVM 3.8.1 in production for some days and both XF & XFMG worked as expected.
    The only problem I faced was regarding CPU and Load usage, both where verywere high, mainly 100% CPU usage as expressed before.

    The results were not what I expect and PHP 5.6 was faster than HHVM in my scenario, but further tests should be done.
    I used the default HHVM configuration with fpm as fallback and used siege to request some pages.
     
  19. eva2000

    eva2000 Well-Known Member

    If you want set and forget + stability, stick with PHP 7 as it matures to a stable release :)
     
  20. Nuno

    Nuno Active Member

    This was for testing propose, I'll wait for PHP7 for sure! :)
     

Share This Page