3 ms·
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 improv
by overcast 10y ago
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.
- Malic 10y agoI 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).
- emeraldd 10y agoIt 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.
- spdionis 10y agoIt's probably just the switch (didnt read the article). A 2-3x performance improvement is reported in almost every project that makes the switch.
- tyingq 10y agoSignificant 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-and-php-7 https://www.symfony.fi/entry/symfony-benchmarks-php-56-hhvm-... http://www.zend.com/en/resources/php7_infographic http://www.zend.com/en/resources/php7_infographic https://techblog.badoo.com/blog/2016/03/14/how-badoo-saved-one-million-dollars-switching-to-php7/#launch-into-battle-and-the-results 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-internally-php-barcelona-2015 http://www.slideshare.net/nikita_ppv/php-7-what-changed-inte...
- TazeTSchnitzel 10y agoA fun thing about that slide deck: the memory use reduction is actually even better, because allocation overhead isn't counted there.
- TazeTSchnitzel 10y agoPHP 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.
- jsjohnst 10y agoI 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.