On Tue, Jan 29, 2013 at 1:06 PM, Zeev Suraski <z...@zend.com> wrote: >> It is inter process sharing and is very expensive, nothing to compare > with shared >> memory within a single process, accross many threads. > > What are you basing that assertion on? Shared memory should have > identical performance to regular process memory. It's mapped in very > similar way. > > There are effectively no performance advantages to using multiple threads > over multiple processes, none whatsoever. It might help you a bit with > memory consumption - but in the case of PHP, FastCGI with it's n:m mapping > is much superior to it. > > Using multiple threads only makes sense if you take functional advantage > of that, like shared objects and such - which we don't.
Testing maybe? >> >> Miss the rest of my mail or? Current implementation is outdated and >> >> slow. >> > >> > That is true. Many modern compilers and environments provide better >> > support for thread local storages .... >> >> Exactly, or more exactly CRTs (libc, crt and the likes)> > > Can we stop arguing about the implementation No, we can't. The main reason of the bugs and performance issue is due to the current implementation and how extensions developers have to deal with it. It is not separable from discussing what could be the worst decision we ever made, droping thread safety. > - which I didn't even bring > up in my original mail - and focus on the original question - why would > you want thread safe PHP in the first place? I mentioned one which is alone a good enough reason. LTS brings zts in line with NTS in term of performance while reducing massively the shared/locks access related bugs for many areas. > So far the only real use case that was brought up was for using pthreads > in a long-running app. I've yet to hear about a single real reason of why > someone would want to use it in web server context that is not based on > misconceptions or myths. Thanks, it is really nice to say something and being told that what has been done is misconceptions or myths, especially if you gave up on thread safety years ago within your company. That's all good, as long as it only affects your company products and not PHP as a whole. > > However let me state my point clear: Giving up on thread safety would > be a >> mistake as big as safemode and other insane choices we made. > > As big as giving up on safe mode or creating it in the first place? If > it's the former, I say let's do it right now :) both :) But with a small difference, back then TSRM was not bad. But it was never updated to what is available now on any modern OS. Cheers, -- Pierre @pierrejoye -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php