Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58253 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8537 invoked from network); 28 Feb 2012 16:16:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2012 16:16:24 -0000 Authentication-Results: pb1.pair.com header.from=tom@punkave.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tom@punkave.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain punkave.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:35612] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/F1-34356-7DDFC4F4 for ; Tue, 28 Feb 2012 11:16:24 -0500 Received: by iaeh11 with SMTP id h11so3034422iae.29 for ; Tue, 28 Feb 2012 08:15:56 -0800 (PST) Received-SPF: pass (google.com: domain of tom@punkave.com designates 10.50.216.231 as permitted sender) client-ip=10.50.216.231; Authentication-Results: mr.google.com; spf=pass (google.com: domain of tom@punkave.com designates 10.50.216.231 as permitted sender) smtp.mail=tom@punkave.com Received: from mr.google.com ([10.50.216.231]) by 10.50.216.231 with SMTP id ot7mr23418535igc.8.1330445756045 (num_hops = 1); Tue, 28 Feb 2012 08:15:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.216.231 with SMTP id ot7mr19052175igc.8.1330445755963; Tue, 28 Feb 2012 08:15:55 -0800 (PST) Received: by 10.231.108.135 with HTTP; Tue, 28 Feb 2012 08:15:55 -0800 (PST) In-Reply-To: References: <5a1d155ad465d1ec2e6461f5347d859f.squirrel@www.l-i-e.com> <4F4BF1C6.8010104@rowe-clan.net> Date: Tue, 28 Feb 2012 11:15:55 -0500 Message-ID: To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkCxp+iBQwq0R4o12Cv5FoipvidY/gpcXHFoikSXVUArb8BkpcDqn1GTmJ45hbZdjZCZAtj Subject: Re: [PHP-DEV] pecl, zts, non-zts, fastcgi and Apache From: tom@punkave.com (Tom Boutell) I did check out the article on using worker thread MPM with PHP on Linux. The basic argument is that since threads can reclaim memory used and then freed by other PHP requests, while processes don't return memory to the OS until they finally exit, there is more memory available. However I doubt that this can be the case when the server is at peak utilization. When things are maxed out you will still have, say, 20 threads hitting PHP scripts that happen to be expensive in terms of memory (let's say 50mb), and that will be roughly all the memory you have to play with in your 1GB system. So you're just as stuck as if you had 20 dedicated fastcgi processes, all maxed out at 50mb already by some previous request. The only win here is that in the average case, you can handle more requests. But you usually can't predict in advance when the worst case will come along. So if you permit that to happen you are risking a slowdown or a meltdown (: For stability a fastcgi pool of the size you know you can handle based on studying your past memory stats still seems to be the way to go. > On Tue, Feb 28, 2012 at 10:41 AM, jpauli wrote: > >> Actually, the true story for performance is to kill Apache and let Lighttpd >> or NginX do the job, with a pool of fcgi/fpm PHP processes > > I'd like to ask you whether it really makes much difference to use > Lighttpd or NginX as opposed to Apache with the worker thread MPM, but > at that point we are officially way off topic (: > > I think that in terms of general architecture, and in terms of what to > do with PHP, those three options are basically the same option. > > I haven't studied FPM yet as I haven't felt a need for its advertised > advantages over the traditional FastCGI support in the CGI SAPI yet. > > I will check out the apache worker and PHP article, thanks. > > -- > Tom Boutell > P'unk Avenue > 215 755 1330 > punkave.com > window.punkave.com -- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com