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

HHVM Support for Xenforo

#1
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?
 

Alteran Ancient

Well-known member
#3
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.
 

dngad

New member
#4
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
 

DroidOne

Well-known member
#6
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.
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:

Xon

Well-known member
#8
Perhaps it's time xenforo optimizes itself for HHVM?
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.
 

dngad

New member
#9
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 :)
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.
 

md_5

Well-known member
#12
Has anyone actually documented where specifically XenForo falls over on hhvm?
Not on any recent version as far as I know.
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:

md_5

Well-known member
#15
HHVM may need to be warmed up before it starts receiving requests. There's some discussion here: Using Warmup requests and Warmup docs · Issue #5312 · facebook/hhvm · GitHub
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.
 

dngad

New member
#16
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.
Exactly lol. Things just fall apart, 100% CPU usage. It's not pretty compared to what I experience with my wordpress running on HHVM...
 

Nuno

Active member
#18
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.