HHVM as PHP script execution mode

11 posts / 0 new
Last post
#1 Wed, 12/18/2013 - 06:25
fuerst

HHVM as PHP script execution mode

Newest hot stuff from Facebook's HHVM (Hip Hop Virtual Machine for PHP) is to run PHP scripts through HHVM using FastCGI. That's a huge performance win for any supported PHP application. See http://www.hhvm.com/blog/1817/fastercgi-with-hhvm for a comparison of performance using Wordpress.

Would be really nice if we could choose HHVM as another PHP script execution mode in virtual servers Website Options. What do you think?

Wed, 12/18/2013 - 06:40
Locutus

They say that "HHVM" uses PHP opcode caching. So I'd be interested how HHVM fares compared to Apache with FastCGI and e.g. XCache active. Otherwise it's a very unfair comparison.

Also, introducing a new PHP execution mode is a rather big step and requires very careful testing, for compatibility, interoperability and security in a Virtualmin environment.

Mon, 07/07/2014 - 14:20
micfai

I'm currently using Nginx and HHVM with Virtualmin. I had to edit the file "/usr/share/webmin/virtualmin-nginx/virtual_feature.pl" in order for it to default to HHVM but it works well and I have no issues with it.

Here are the edits I made starting with line 247:

my $ploc = { 'name' => 'location',
     'words' => [ '~', '\.(hh|php)$' ],
     'type' => 1,
     'members' => [
                { 'name' => 'fastcgi_keep_conn',
                  'words' => ['on'],
                },
{ 'name' => 'fastcgi_pass',
  'words' => ['127.0.0.1:9000'],
},
                { 'name' => 'fastcgi_index',
                  'words' => ['index.php'],
                },
                { 'name' => 'fastcgi_param',
                  'words' => ['SCRIPT_FILENAME', '$document_root$fastcgi_script_name'],
                },
                { 'name' => 'include',
                  'words' => ['fastcgi_params'],
                },
     ],
   };
Thu, 07/31/2014 - 10:45
eddieb

i'd also like to use hhvm with apache on centos.

Wed, 08/06/2014 - 09:49
mikt

But would that not mean that all the files are executed by whoever is running the hhvm process (in my case that would be www-data) and as such breaking the security on multiuser-systems?

Would it not be the better way to setup a user specific hhvm process per virtualmin hosted site? AFAIK this is the case with the fast-cgi processes currently in use.

Wed, 08/06/2014 - 10:20
micfai

mikt,

Unfortunately you currently can't setup HHVM to run as user specific process per virtual server. I have been discussing this with the HHVM developers to get this implemented.

Thu, 09/11/2014 - 23:58
RealGecko

I`m interested in this feature too. My current setup is to run Nginx and FCGId. Switching to hhvm may be really nice performance boost.

Fri, 09/12/2014 - 02:11
mikt

I now have hhvm running for each website - you need to do that manually - but it works fine!

Fri, 09/12/2014 - 03:23
RealGecko

It would be nice to have this feature accessible through Virtualmin interface :)

Sun, 01/18/2015 - 07:02
simber

any update on this?

Sat, 04/18/2015 - 03:43
ADDISON74

HHVM has at least double in performance comparing with PHP5.6 + opcache enabled. In my opinion Virtualmin users need a solution for using HHVM as well as default setup. Please share your thoughts to find a way to get this working. Thank you.

Topic locked