3 ms·
Color me the unimpressed. Anyone writing an article promoting the use of threaded concurrency and using PHP as an example of threading done right obviously doe
by rcoder 19y ago
Color me the unimpressed.
Anyone writing an article promoting the use of threaded concurrency and using PHP as an example of threading done right obviously doesn't know what they're talking about. PHP has basically zero support for threads, and historically has basically barred you from using the threading MPMs in your Apache setup, too, since so few extension modules were thread safe.
Even worse, he obviously has some trouble understanding the relationship between threads and processes in any modern multi-tasking OS, which leads him to say silly FUD-esque things about processes being unable to effectively utilize multi-core systems.
Threads are just processes that share some state. They offer no inherent performance advantages over plain processes in a "shared-nothing" architecture, unless your bottleneck is copying of data between processes on a single machine.
A fully-threaded Rails stack would kick ass for one reason: RAM. Instead of having 6, 8, or more 100+ MB Mongrel listeners, you could have a single 150-200 MB process with only one copy of its shared state, loaded libraries, etc.