High Performance Islandora, HHVM and PHP7

94 views
Skip to first unread message

Diego Pino

unread,
Mar 26, 2016, 5:49:24 PM3/26/16
to islandora-dev
Hi,

Opening discussion/reporting about code optimisation, compatibility and some thoughts since Islandora is and will continue to be PHP.

For the last weeks i have been working trying to squeeze as much speed from a Islandora/Fedora 3 installation with some very interesting results (using Varnish with dual backends, x cache tags, opcode cache in php, memcached, etc).
Even when having a very flexible caching stack can improve islandora/drupal performance to incredible numbers for anonymous users, like less than 100ms average for a 50 thumbs collection listing using ab tool, there are certain, admin tasks, that can't be cached as good/safely as i would like (there are some tricks, but out of scope here)
So i thought, since i'm using php 5.5.9 already, why not test some php side optimisations, by using alternatives to official PHP and also shiny new PHP7 which is blazing fast.

My first test with HHVM where pretty impressive. HHVM is the Facebook alternative to php (http://hhvm.com/) , which performs very good for heavy code tasks. For simple scripts, difference is none, even sometimes a few ms slower, but for
heavy processing code(someone said XML?) the numbers are very fine, very fine indeed.

Sadly HHVM is mostly php 5.5 compatible,with some minor issues (https://github.com/facebook/hhvm/issues?q=is%3Aopen+is%3Aissue+label%3A%22php5+incompatibility%22)  i'm trying to solve/document the next weeks and more sadly even most of those issues are related to XML =(. Probably the most annoying one i found is that relative path loading of xml files (XSD, etc) in drupal fails bad. Not sure if i can fix this by tunning the hhvm config yet.

PHP7 . Mayor change. Faster than PHP-FPM and could even surpass HHVM.
Still have to go through all the compat notes and our code before testing, but looks promising. 

That all said, some mind notes:

Should we consider moving to PHP 7 (coding standards, practices) in Islandora Claw? The whole idea of going slow (apart of lacking more developer time of course, which is not and idea, but a reality) is to be able to make long time decision that are good for the community. Fast is good? 
Symphony is PHP 7 compatible, Silex runs fine under PHP 7. Drupal 7 some stuff fails, Drupal 8 somehow, mostly, but tests pass (D8 is slower than Drupal 7, but other discussion, does not mean it's the only implication on deciding which one is better)

PHP 5.x is slow. Very slow. so slow. slow

Would love on other people experiences, opinions. Maybe i'm obsessed with performance.


Thanks!



Nick Ruest

unread,
Mar 28, 2016, 2:53:26 PM3/28/16
to island...@googlegroups.com
I support this, and looking forward to the conversation on Wednesday :-)


Just a couple notes:
* Some preliminary HHVM work was attempted and abandoned:
https://github.com/Islandora/islandora_solution_pack_collection/pull/131

* chullo tests against PHP 7.0 and HHVM:
https://github.com/Islandora-CLAW/chullo/blob/master/.travis.yml

Other than that, we're at the mercy of Drupal.

-nruest
> --
> You received this message because you are subscribed to the Google
> Groups "islandora-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to islandora-de...@googlegroups.com
> <mailto:islandora-de...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/islandora-dev/4a4ee5bc-f206-4fe0-8946-7fc4f4c0ab97%40googlegroups.com
> <https://groups.google.com/d/msgid/islandora-dev/4a4ee5bc-f206-4fe0-8946-7fc4f4c0ab97%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Diego Pino

unread,
Mar 28, 2016, 5:46:49 PM3/28/16
to islandora-dev
Cool. good, good. Thanks Nick! Yeah, i will run some tests on Drupal 7, Drupal 8 passes last time i checked.

Peter Murray

unread,
Mar 30, 2016, 3:49:15 PM3/30/16
to Islandora Development
Thanks for posting about your work, Diego!  Lots of important stuff here to chew on.  I don't have much to add to the performance testing you've done with HHVM, but your last question -- whether to move to PHP7 -- prompted this opinion email.  It is probably important for projects like Islandora to stay close to the mainstream, and in our case the mainstream is the larger numbers of general Drupal developers.  Open source development may be the one place where the answer to "if everyone jumped off a cliff would you follow?" is "yes".  So that should be weighed against the potential for a faster PHP compiler/VM.


Peter
-- 
Peter Murray
Dev/Ops Lead and Project Manager, Cherry Hill Company
Blogger, Disruptive Library Technology Jester - http://dltj.org/


Nick Ruest

unread,
Mar 31, 2016, 4:26:23 PM3/31/16
to island...@googlegroups.com
https://www.symfony.fi/entry/php-7-included-in-ubuntu-16-04-lts-xenial-xerus

Might be something to consider moving forward deployment-wise for both
stacks.

-nruest

On 2016-03-30 03:49 PM, Peter Murray wrote:
> Thanks for posting about your work, Diego! Lots of important stuff here
> to chew on. I don't have much to add to the performance testing you've
> done with HHVM, but your last question -- whether to move to PHP7 --
> prompted this opinion email. It is probably important for projects like
> Islandora to stay close to the mainstream, and in our case the
> mainstream is the larger numbers of general Drupal developers. Open
> source development may be the one place where the answer to "if everyone
> jumped off a cliff would you follow?" is "yes". So that should be
> weighed against the potential for a faster PHP compiler/VM.
>
>
> Peter
>
>> On Mar 26, 2016, at 5:49 PM, Diego Pino <dp...@krayon.cl
> --
> You received this message because you are subscribed to the Google
> Groups "islandora-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to islandora-de...@googlegroups.com
> <mailto:islandora-de...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/islandora-dev/23A75A5D-1D8C-450C-B004-B620DF5D2958%40dltj.org
> <https://groups.google.com/d/msgid/islandora-dev/23A75A5D-1D8C-450C-B004-B620DF5D2958%40dltj.org?utm_medium=email&utm_source=footer>.

Diego Pino

unread,
Mar 31, 2016, 4:36:58 PM3/31/16
to islandora-dev
Cool Nick, April 2016 and a new long term support release!

Peter Murray

unread,
Mar 31, 2016, 5:05:43 PM3/31/16
to island...@googlegroups.com
Thanks, Nick! Fascinating:


> There are plans to get Drupal 7 working with PHP 7, but there are still some issues remaining. With everything that's going on with Drupal 8, I don't think folks have had a chance to jump into this too deeply just yet. For more information, see https://www.drupal.org/node/2454439.

- https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1522422/comments/114 (23-Mar-2016)


This is big news.


Peter
Reply all
Reply to author
Forward
0 new messages