Re:PHP 7 at Tumblr
by overcast on Thursday November 10, 2016 @11:56AM
(#12922024)
That's quite a performance improvement. I'm curious if this was directly related to just switching to PHP7, or something under the Tumblr hood, that they improved upon as well. While reviewing their own code.
[ Parent
| on HN ]
Significant improvement in response times, TPS, and memory usage are pretty universally observed when switching from PHP5.x to PHP7...
https://www.symfony.fi/entry/symfony-benchmarks-php-56-hhvm-...
http://www.zend.com/en/resources/php7_infographic
https://techblog.badoo.com/blog/2016/03/14/how-badoo-saved-o...
Edit: A slide deck with some detail on why it's so much better: http://www.slideshare.net/nikita_ppv/php-7-what-changed-inte...
Re:PHP 7 at Tumblr
by TazeTSchnitzel on Thursday November 10, 2016 @01:18PM
(#12922760)
A fun thing about that slide deck: the memory use reduction is actually even better, because allocation overhead isn't counted there.
I wasn't involved in the switch, but having extensive knowledge of the code base at Tumblr (used to work there for 3 years) as well as extensive knowledge of PHP (have been a PHP contributor for ~13 years), I can say that this was likely >95% directly related to the switch to PHP7. Many of the patterns used in Chorus (inhouse framework Tumblr is based on) and in the codebase in general would very much benefit from the changes in PHP7 internals.
Re:PHP 7 at Tumblr
by TazeTSchnitzel on Thursday November 10, 2016 @01:14PM
(#12922734)
PHP 7 contains a massive overhaul of the PHP interpreter's internal data structures (phpng), which drastically cuts memory usage and improves cache locality, which leads to better performance. There's also some new optimisations, too.
I guessing that it was just the PHP7 switch. We are seeing similar performance/resource-usage changes just with a switch from PHP5.6 (opcache enabled) to PHP7 (opcache enabled).
It's probably just the switch (didnt read the article). A 2-3x performance improvement is reported in almost every project that makes the switch.
It sounded like they were running the same code in both places, not a separate code base. (With the exception of extensions.) So unless those extensions are heavier than I'd guess, probably just the PHP upgrade.