Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65362 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25770 invoked from network); 29 Jan 2013 11:56:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2013 11:56: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.181 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.181 mail-lb0-f181.google.com Received: from [209.85.217.181] ([209.85.217.181:62312] helo=mail-lb0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/33-10721-009B7015 for ; Tue, 29 Jan 2013 06:56:49 -0500 Received: by mail-lb0-f181.google.com with SMTP id gm6so602845lbb.40 for ; Tue, 29 Jan 2013 03:56:45 -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:content-type; bh=UY8Qzm39Qgj3qBF5POEP64q+SKN4SZvnxN0OqLNwn2Y=; b=S5CDlNfibwLbflE8l6Wa+/MdPfBXKyyDMYMB0dMnxQt2pTiQHew5pcRja5ldbFXsRd UrU0SJjDbZ1p3wPhXT9pk2m6s4aaOSZHtbP8nsBncw++/mRlAuiRPZ0A2jxlnSvrotU0 lxG5A+wdMeOZ+8nrLi+YBNhb+WH6ehIYlyJzheNrKQ754JAuc+P4CDGQfL62P7b55k+9 ZkfyusUkESYCu+lcNqajlwion4CBAMcv42SYxHx0ZpxlL3M59OsVI4iCCtIdw5QXh6YM vbuTJDpWy1BktCtUA3ikPnRCfAviBBSkNsuZp2KdSEEPDmnPY5cSc31DTsLFJoltyYkW oL4Q== MIME-Version: 1.0 X-Received: by 10.152.104.36 with SMTP id gb4mr914257lab.13.1359460605500; Tue, 29 Jan 2013 03:56:45 -0800 (PST) Received: by 10.112.2.69 with HTTP; Tue, 29 Jan 2013 03:56:45 -0800 (PST) In-Reply-To: References: Date: Tue, 29 Jan 2013 12:56:45 +0100 Message-ID: To: Zeev Suraski , 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 12:36 PM, Zeev Suraski wrote: >> Laziness and design mistake. Everything on windows (AD,IIS, asp.net, etc) >> uses thread. >> >> And no, nuts is not faster. I am not talking about PHP zts, but in >> general. > > > Of course everything that is Windows native uses threads, but I don't > believe any language that is single-threaded on other platforms - has a > thread safe version for Windows. Python, for example, is thread safe by default. Extensions developers can rely on its APIs to write TS code. Our core is designed in a way that it is painful to have to deal with two code bases. That's what causes troubles, not really something else. > I disagree that laziness and design mistakes are what makes ZTS slower. > It's slower by design, since instead of relying on operating system > isolation - you have to emulate it yourself in userland code. It was and still is a lazy and design mistake to have focused on FastCGI to support PHP on IIS more easily, while everything else in this stack uses what the whole OS stack does. > Contrary to popular belief FastCGI actually works very very well on Windows, > and has substantial advantages over using a server module - even on Linux > (it's no coincidence that there are hoards of users migrating from Apache to > nginx, where a server module isn't even an option - and they're seeing > better performance, not worse). I never said that FastCGI does not work well. But that doing so will never allow us to reach the performance we could get using a more suited implementation. About nginx vs Apache, I'm also quite sure that we can get an Apache SAPI module performing as good as nging with FPM. It is only almost impossible with the current implementation of PHP, we both know that. We have seen examples in the past already where well optimized php and apache were as fast as lighttpd (back then) with a correct setup. Again, giving up on thread safety is a major mistake. Cheers, -- Pierre @pierrejoye