Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48731 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69142 invoked from network); 10 Jun 2010 16:38:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2010 16:38:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.222.189 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.222.189 mail-pz0-f189.google.com Received: from [209.85.222.189] ([209.85.222.189:35663] helo=mail-pz0-f189.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/00-03133-0E4111C4 for ; Thu, 10 Jun 2010 12:37:52 -0400 Received: by pzk27 with SMTP id 27so69876pzk.2 for ; Thu, 10 Jun 2010 09:37:49 -0700 (PDT) Received: by 10.141.124.18 with SMTP id b18mr289604rvn.202.1276187868730; Thu, 10 Jun 2010 09:37:48 -0700 (PDT) Received: from Rasmus-Lerdorfs-MacBook-Pro.local ([24.7.29.193]) by mx.google.com with ESMTPS id i19sm174071rvn.23.2010.06.10.09.37.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Jun 2010 09:37:47 -0700 (PDT) Message-ID: <4C1114D8.50109@lerdorf.com> Date: Thu, 10 Jun 2010 09:37:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Brian Moon CC: Frederic Hardy , internals References: <4C10FD00.1050204@lerdorf.com> <4C1102D4.6080105@moonspot.net> <4C110501.1090906@mageekbox.net> <4C1108CE.2090308@lerdorf.com> <4C111350.6040109@moonspot.net> In-Reply-To: <4C111350.6040109@moonspot.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Gearman support for php-fpm? From: rasmus@lerdorf.com (Rasmus Lerdorf) On 6/10/10 9:31 AM, Brian Moon wrote: >> [gearman] >> worker1.path = /path/to/worker1.php >> worker1.pm = dynamic >> worker1.pm.max_children = 10 >> worker1.pm.start_servers = 5 >> >> worker2.path = /path/to/worker2.php >> worker2.pm = dynamic >> worker2.pm.max_children = 4 >> worker2.pm.start_servers = 2 > > So, this is a proposed new entry in the ini format? I am a bit ignorant > about fpm, I admit. This would require a good bit of fiddling for our > gearman set up to work with it. We run X workers that know how to do all > jobs available and then 1 + n (defined by ini file) that only do one job > for each available job. This gives us good coverage with controlled > process load. I guess it would just require a lot more configuration > than we have now. For example, could we pass parameters to the script? > Having a separate script plus a separate class for every function > quickly makes a lot of files. > > I will simply stay tuned and see where it goes. > > FWIW, this is my GearmanManager that basically does this already via > PHP+pcntl. http://github.com/brianlmoon/GearmanManager. It can not > dynamically ramp up more workers like FPM can. But, I would never run it > that way anyhow. I like my processes under control. Yes, I know, I have seen it. Process management and signal handling like that really isn't something that should be done in PHP as far as I am concerned. And FPM already does all of this and more. It just needs a slight tweak to be able to manage any sort of php process. -Rasmus