Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65365 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30346 invoked from network); 29 Jan 2013 12:08:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2013 12:08:36 -0000 Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain zend.com does not designate 209.85.219.47 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.219.47 mail-oa0-f47.google.com Received: from [209.85.219.47] ([209.85.219.47:62873] helo=mail-oa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/34-10721-4CBB7015 for ; Tue, 29 Jan 2013 07:08:36 -0500 Received: by mail-oa0-f47.google.com with SMTP id h1so324868oag.6 for ; Tue, 29 Jan 2013 04:08:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=qHEREhlxQadaEj2j5h93BFqtMoLj6HrW/RJptXGt4No=; b=XMyp77+lJW92Q9G6+7yhPwbSzpUAKV/EKhVZ+OKMyTXDzUUK7Hymo99u3u88U86DRr EAGj4SDKTA/mXk8wN99yMK6+kArULW6W0mfUkXmPImXRwcsw5Fo3Ve8wwiHcFL9bQloB 3stN89zVecr/L8cQJxdAvdLFvi22xQA1TCJO3wFd9TpGsEmlE53t7ACNOHYCLsat9QuE C3nVB281TXaFcLNFJWN/jcL+A6vEJNkNc2I3W5UVSvE2WmzxHia8OErBxv5PFGc2ANT8 6/rUKi+ZXKCgrYPcVeR7n67Xhnx3oIJOR/64Y++XZpvuK5kC2RXEndcbNxzTHdthfmN+ df9Q== MIME-Version: 1.0 X-Received: by 10.60.32.44 with SMTP id f12mr548859oei.61.1359461313736; Tue, 29 Jan 2013 04:08:33 -0800 (PST) Received: by 10.76.83.195 with HTTP; Tue, 29 Jan 2013 04:08:33 -0800 (PST) In-Reply-To: References: Date: Tue, 29 Jan 2013 14:08:33 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlrAW2nOIhXzW3ik+e4O2aOEVO+yr1EQoVHgJv189le0iWvjeLbbXZ+XjnJCd+w7Gh17+SjNKZSUWES+xRn/AlYxoCONDYh5fY3TY3+QQchOLkWIL8c8tG9LqluTci6sYDTY1xe Subject: Re: [PHP-DEV] ZTS - why are you using it? From: zeev@zend.com (Zeev Suraski) On Tue, Jan 29, 2013 at 1:15 PM, Pierre Joye wrote: > > > On Jan 29, 2013 12:10 PM, "Zeev Suraski" wrote: > > > > > The other main reason from my side to keep ZTS is Windows. Windows > > cannot > > > perform well using process based SAPI. > > > > Windows actually works quite well with FastCGI. So well Microsoft even > > created their own version for IIS. It's outperforming the ISAPI module by > > a wide margin. > > 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. 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. 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). > > > Other than Apache/Windows not having FastCGI support(*), I really can't > > imagine any situation where using ZTS inside of a Web Server context makes > > any sense at all. I wouldn't call it a new trend, it's both old (I've > > been pushing for it since at least 2006, probably earlier) and with very > > solid technical reasons (faster, more reliable). > > Miss the rest of my mail or? Current implementation is outdated and slow. How does it relate to what I said? Regardless, a new implementation of ZTS will not change the fundamentals. We're unlikely to ever achieve single-threaded performance or reach the same level of stability with ZTS. With a system like PHP that is all about concurrency of stateless, independent requests - I don't think we're going to reach any meaningful limits any time soon. FastCGI has another huge advantage, in that it breaks the 1:1 linkage between a 'processing unit' (a web server process or thread) and a PHP instance, and makes it an n:m mapping - in that you could have a lot more web server processing units than you would need PHP instances. That's one of the key reasons you can achieve better performance / density with PHP on nginx than you can with Apache. The same would apply to IIS - ISAPI vs. FastCGI. Zeev