Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65367 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33531 invoked from network); 29 Jan 2013 12:18:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2013 12:18:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.171 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.171 mail-lb0-f171.google.com Received: from [209.85.217.171] ([209.85.217.171:52607] helo=mail-lb0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/E4-10721-72EB7015 for ; Tue, 29 Jan 2013 07:18:48 -0500 Received: by mail-lb0-f171.google.com with SMTP id gg13so640606lbb.30 for ; Tue, 29 Jan 2013 04:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=H4X5WXccXZ2z3SPy7587uuOxoH0Pl9UtuhRpVvomwFc=; b=tRAKOwWoYI6kIENOxlFmTVon2v1wQAP61SZZUXXwPase/h6YV7T6yJGtOvok4kaBcJ U3jTqAis9d6CwM7SUv5JN5gNxdzkBdg6b6/IA/DPyhrmpK+j68CQSvHy8mVw6ScGJ5Jk pZRGw/eEA/zi4sPh4StvkmCV4wGnvKja3Y67nXkMPO8S0tS5e7g+lmELEd3T6ChqrkXt tG7vAvA77Gl4uQSjrfkMqGs9dYxxdIW9AyMYh0dfGGwdg7iscUsLpC5cktzaVFUqj9oP WgVr5lg5yK1Zi2xg5v/tRzVIGYqJS5GduD6If137rHkqNBLzBbUByMXmymM89Jn88Hsw /nag== MIME-Version: 1.0 X-Received: by 10.152.102.177 with SMTP id fp17mr1003966lab.0.1359461924024; Tue, 29 Jan 2013 04:18:44 -0800 (PST) Received: by 10.112.2.69 with HTTP; Tue, 29 Jan 2013 04:18:43 -0800 (PST) In-Reply-To: References: <1359459921.3916.105.camel@guybrush> Date: Tue, 29 Jan 2013 13:18:43 +0100 Message-ID: To: Zeev Suraski Cc: =?ISO-8859-1?Q?Johannes_Schl=FCter?= , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] ZTS - why are you using it? From: pierre.php@gmail.com (Pierre Joye) On Tue, Jan 29, 2013 at 1:06 PM, Zeev Suraski 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