[HacktionLab] HHVM vs PHP-FPM (was Re: Server efficiency slides)

Marcus Valentine marcus at marcusv.org
Wed Nov 18 21:26:12 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks everyone for your replies.

I've installed PHP5-FPM alongside HHVM. As the three applications
(wordpress, roundcube and owncloud) will be running on a different
subdomains, I can configure each one individually. So I will use
PHP5-FPM for roundcube and owncloud (as HHVM doesn't work) and stick
with HHVM for wordpress to benefit from its better performance.
Here's the benchmark comparison 'twixt HHVM

Requests per second:    92.40 [#/sec] (mean)

and PHP5-FPM tested on the same page

Requests per second:    35.49 [#/sec] (mean)

Solid

Marcus


On 16/11/2015 15:19, Mike Harris wrote:
> Hi All,
> 
> Yes, APC did it on Network23.org, although HHVM is also running
> there.
> 
> Recently applied APC on a couple of XtreamLab web sites and also a 
> couple from my day job (all WP installs) and the improvement was 
> significant, like twice as fast.
> 
> Those I know Marcus already knows this, so perhaps HHVM is better
> Marcus?
> 
> I know that WP Super Cache was something we had to drop on n23 as
> it just didn't play well with the network install and we switched
> to W3 Total Cache, which seems to work very well.
> 
> Mike.
> 
> El 16/11/2015 a les 13:19, johnc ha escrit:
>> Hi,
>> 
>> I haven't tried HHVM yet but recently used another PHP
>> accelerator on a wordpress based site:
>> 
>> apc. (php-apc package on debian)
>> 
>> This improved page load time significantly and didn't seem to
>> cause any problems. You could alternatively try the zend one if
>> that doesn't work out for you.
>> 
>> I also improved performance by using this static html caching
>> plug-in with really good results:
>> 
>> https://wordpress.org/plugins/wp-super-cache/
>> 
>> I also optimized image size on the wordpress site by using this
>> plug-in:
>> 
>> https://wordpress.org/plugins/ewww-image-optimizer/changelog/
>> 
>> I've been using these tools to benchmark: 
>> https://developers.google.com/speed/pagespeed/insights/ 
>> http://www.webpagetest.org
>> 
>> The latter allows emulation of different browsers which is nice.
>> Both provide tips on improving performance for your site/server.
>> 
>> Doing the above was really easy, didn't break anything and
>> improved performance significantly.
>> 
>> HTH.
>> 
>> Cheers, John
>> 
>> 
>> 
>> On 15/11/15 12:17, Marcus Valentine wrote:
>>> Following up on Daniel's and Ben's thought-provoking talk at
>>> Barncamp on this Summer, I've been experimenting with a server
>>> build intended to serve PHP stuff* (specifically wordpress)
>>> more effectively.
>> 
>>> My build is
>> 
>>> Debian GNU/Linux 8.2 (jessie) nginx version: nginx/1.6.2 HipHop
>>> VM 3.10.1 (rel) MariaDB Server version:
>>> 10.0.22-MariaDB-0+deb8u1 (Debian)
>> 
>>> This build plays nicely with current wordpress (4.3.1).
>> 
>>> The test VM has 4GB of RAM and uses 2 CPU (from a total of 6)
>>> from a AMD Phenom II X4 20 Processor
>> 
>>> Running the apache stress test on a minimal wordpress front
>>> page
>> 
>>> ab -c 50 -n 1000 http://mytestsite.local
>> 
>>> I get
>> 
>>> Requests per second:    84.66 [#/sec] (mean)
>> 
>>> For comparison, on my production server, (16 GB RAM, AMD Phenom
>>> II X6 1055T Processor), running a conventional LAMP stack. I
>>> get
>> 
>>> Requests per second:    8.58 [#/sec] (mean)
>> 
>>> So far so good. Moving onto other php stuff, phpmyadmin works
>>> fine.
>> 
>>> Unfortunately Roundcubemail doesn't work:
>> 
>>> https://github.com/facebook/hhvm/issues/5185
>> 
>>> Nor does Owncloud
>> 
>>> https://github.com/owncloud/core/issues/10837
>> 
>>> It seems roundcube and owncloud _will_ play nicely with
>>> php-fpm. So my options include running php-fpm in parallel with
>>> HHVM, or abandoning HHVM and just going with php-fpm.
>> 
>>> Thoughts?
>> 
>>> Safe
>> 
>>> Marcus
>> 
>> 
>>> * Struggling for the correct word
>> 
>>> On 06/07/2015 17:38, daniel wrote:
>>>> Hey guys, Here are the slides and lecture notes from the talk
>>>> on server efficiency and optimization. I am
>>>> soooooooooooooooooo sorry it took so long to get them sent
>>>> off. Been super busy. I'd put it on the wiki but I'm having a
>>>> brain freeze and can't figure out how to register a new
>>>> account. Please do let me know if you guys have any further
>>>> thoughts, comments, questions, or corrections about any of
>>>> the stuff on here. I think that we and the rest of the team
>>>> at Noflag had a fantastic time and we're looking forward to
>>>> the next one. Let's keep in touch about the possibility of
>>>> having the Winter Gathering in Scotland this time, eh! All
>>>> the best, Daniel
>> 
>>>> http://noflag.org.uk/server-efficiency.pdf 
>>>> https://noflag.org.uk/noflag-server.odp
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJWTOz0AAoJEKxObMLmgjug5iIQAItLxAL3i5JdEyCnf3T/9XUJ
4JneLuQ/4C5fqK8dkvBW1YKur5uEfah2OJmM+oFLPEz6xiYQEMm5HVSSmKzQy1pX
/Rsu3T7i+N4xaawZlYohIAYdTq7G3cmII/oP4GNlHujzfoGMVLrumCBdJPrj/vSA
IwiuK1MFqjHO45JOmyHs6hklIPS7SUkSp0DZx7fbVCe8IYSr3NooJa3OpWsPgtBC
H+DeM+BQgbFsMKN8+EhmGY/9Ajamvy/izN6sClFDucugg4bQ2sISEEU3GvU845Ru
sDJXUHHJkJMQ2A0TZNsigL98dKiG4qtFnG+CRbICmjTq8l44IssFbZ8A0BnmiLHH
V1WyJ2aMoFv6wpb0Bu+6zW9zaen6Dj+kBxfasf+GlAXKU584cA23IK/360LCfcyr
4uUR4JY8fv7lkOuINCQHPZ3YA+LSg/I/cTIQD0UbWLgojv8hdyqdi2sFDZSi37r4
Z0coeBtyuVLvS+BToFf8lhPWmwOTe2SU20LXUoIFNGW8mgXPBMHu+zTHrksJNqzN
ORpfWtpFHbnLlrco7WiosQNwDitR6TdvUmQnojADeh/2VpVbOHD78dihYIgkr6pw
TfxsqErnobePta5SL20rBsBh/PH6db8FiTd9xaLOdFzUwcbcKO8/Ndj42TzHyPT5
dONDt2KfY3kl6heAi3/5
=Ip0h
-----END PGP SIGNATURE-----



More information about the HacktionLab mailing list