Quantcast
Viewing all articles
Browse latest Browse all 69

HHVM’s Threading Difference – Not The Same as PHP-FPM

The post HHVM’s Threading Difference – Not The Same as PHP-FPM appeared first on ma.ttias.be.

I'm glad Etsy found this before the rest of us had to.

Most PHP SAPIs are implemented such that each request is handled by exactly one process, with many processes simultaneously handling many requests.

HHVM is a threaded SAPI. HHVM runs as a single process with multiple threads where each thread is only handling exactly one request. When you call setlocale(3) in this context it affects the locale for all threads in that process. As a result, requests can come in and trample the locales set by other requests as illustrated in this animation.
Code as Craft -- Etsy blog

HHVM pays of. It's more than twice as fast as PHP 5.4 in my benchmarks. But, it's not a drop-in replacement for PHP-FPM.

As with everything: testing, testing & testing.

The post HHVM’s Threading Difference – Not The Same as PHP-FPM appeared first on ma.ttias.be.


Viewing all articles
Browse latest Browse all 69

Trending Articles