Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65373 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43965 invoked from network); 29 Jan 2013 13:15:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2013 13:15:25 -0000 Received: from [127.0.0.1] ([127.0.0.1:3248]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id E6/F6-10721-A6BC7015 for ; Tue, 29 Jan 2013 08:15:22 -0500 Authentication-Results: pb1.pair.com smtp.mail=damian@tylczynski.pl; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=damian@tylczynski.pl; sender-id=unknown Received-SPF: error (pb1.pair.com: domain tylczynski.pl from 74.125.83.43 cause and error) X-PHP-List-Original-Sender: damian@tylczynski.pl X-Host-Fingerprint: 74.125.83.43 mail-ee0-f43.google.com Received: from [74.125.83.43] ([74.125.83.43:46550] helo=mail-ee0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/46-10721-E38C7015 for ; Tue, 29 Jan 2013 08:01:51 -0500 Received: by mail-ee0-f43.google.com with SMTP id c50so218490eek.16 for ; Tue, 29 Jan 2013 05:01:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-received:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=Od8tJrrjRhs8cLoDCf1Z9Sb/JeWAkAREhWxVaF/MnfU=; b=M/oruqLNoDHLKA7xYpZzvRG/Tg/Vj0AaGGyPtV5nZhNaIHG3vkVrylb5owa5rTuMLy 5NPeq3uufs0jJbWQsKbh2Fv5s72huakFG8TKlfeRZ2PaDLc/8rrNdkHGNjdyVzhnxNM6 CI2jnlrcc6BLHnUhSIz9lB/KxnXenqrpTzZIvqBuYodyIaLsm+5789gxumS2wE9hOrNs e1q2AvKq54mNajJhYQurPM/xN/017SND7OuyFdlfQIh3Ox32vzSXntmi1etwRuiIYLbf teNaDReB2M6LrbYNfl0UqVnwI5SQq1lMAWWhGo3WobYUAZJIPwz36hWXff9FLIZcr5Rp BAcQ== X-Received: by 10.14.224.137 with SMTP id x9mr3273397eep.11.1359464507960; Tue, 29 Jan 2013 05:01:47 -0800 (PST) Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by mx.google.com with ESMTPS id 46sm20281896eeg.4.2013.01.29.05.01.46 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jan 2013 05:01:46 -0800 (PST) Received: by mail-ee0-f50.google.com with SMTP id e51so220275eek.9 for ; Tue, 29 Jan 2013 05:01:46 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.14.216.70 with SMTP id f46mr3272070eep.12.1359464506076; Tue, 29 Jan 2013 05:01:46 -0800 (PST) Received: by 10.223.160.136 with HTTP; Tue, 29 Jan 2013 05:01:45 -0800 (PST) In-Reply-To: References: <1359459921.3916.105.camel@guybrush> Date: Tue, 29 Jan 2013 14:01:45 +0100 Message-ID: To: Zeev Suraski Cc: Pierre Joye , =?ISO-8859-1?Q?Johannes_Schl=FCter?= , PHP internals Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnynZy1+/7NIZ7uG2cAZwSOxiTw6AHrEk4pq8z8027neWZGtbpmsaQWytfSUaKu3KCjOCSZ Subject: Re: [PHP-DEV] ZTS - why are you using it? From: damian@tylczynski.pl (=?ISO-8859-2?Q?Damian_Tylczy=F1ski?=) As a developer I really enjoyed that discussion, it was very informative for me. I'm always stuck with question which version of PHP to use. 2013/1/29 Zeev Suraski : >> -----Original Message----- >> From: Pierre Joye [mailto:pierre.php@gmail.com] >> Sent: Tuesday, January 29, 2013 2:19 PM >> To: Zeev Suraski >> Cc: Johannes Schl=FCter; PHP internals >> Subject: Re: [PHP-DEV] ZTS - why are you using it? >> >> 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. >> >> Testing maybe? > > Retest then, you've got it wrong. Shared memory (or memory mapped files > as they'd be on Windows) are simply memory, it's available to the process > in exactly the same way and while the OS does slightly different > book-keeping for it in how it populates the pages - it's negligible. > >> >> >> 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. > > Well, I'm not interested in discussing the implementation when the need > isn't clear to me. > For example, you could say that thread-safe PHP would be 2x faster. Or 2= x > more memory efficient. Or will enable us to do XYZ which we otherwise > can't. > For now, an *utopian* ZTS mode would, at best, not give us anything. > Even if we put aside the performance/reliability issues - why would > someone want that mode over other modes? > >> > 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. > > Pierre, I'm sorry, but when you state something like '[shared memory] is > inter process sharing and is very expensive', there's no other way to > describe it other than a myth. Better theoretical performance is a > misconception. The best PHP performance/density available today is on > nginx, which couldn't be farther away from > multithreaded-PHP-in-process-arch. > > Even after what you just said, you've yet to bring up a single reason for > why one would want to use ZTS inside a web server context. You seem to > love ZTS with a vengeance but you can't quite explain why. My 'company' > didn't decide anything regarding ZTS. It was me, probably the person wit= h > the most experience with ZTS back in the day, and it was probably much > more difficult for me than anybody else to realize that the ZTS approach > was the wrong path to go to as it was my baby project. > > BTW, for the love of [insert here], I'm not talking about killing thread > safety. It's useful for long running processes, and who knows, maybe in > the future we'll have threads inside PHP. But I *am* talking about > telling people that using ZTS in production is not recommended and that > they should be using FastCGI instead. > > Zeev > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 Pozdrawiam, Damian Tylczy=F1ski