Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48730 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67116 invoked from network); 10 Jun 2010 16:31:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2010 16:31:17 -0000 Authentication-Results: pb1.pair.com header.from=brian@moonspot.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=brian@moonspot.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain moonspot.net designates 72.5.90.27 as permitted sender) X-PHP-List-Original-Sender: brian@moonspot.net X-Host-Fingerprint: 72.5.90.27 smtp.dealnews.com Linux 2.5 (sometimes 2.4) (4) Received: from [72.5.90.27] ([72.5.90.27:49062] helo=smtp.dealnews.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/39-17116-353111C4 for ; Thu, 10 Jun 2010 12:31:16 -0400 Received: (qmail 16194 invoked from network); 10 Jun 2010 16:31:06 -0000 Received: from unknown (HELO mail.dealnews.com) (10.1.10.7) by -H with ESMTPS (DHE-RSA-AES256-SHA encrypted); 10 Jun 2010 16:31:06 -0000 Received: (qmail 28727 invoked from network); 10 Jun 2010 16:31:12 -0000 Received: from h105.248.18.98.static.ip.windstream.net (HELO macdough.local) (brianm@98.18.248.105) by -H with ESMTPA; 10 Jun 2010 16:31:12 -0000 Message-ID: <4C111350.6040109@moonspot.net> Date: Thu, 10 Jun 2010 11:31:12 -0500 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: Rasmus Lerdorf CC: Frederic Hardy , internals References: <4C10FD00.1050204@lerdorf.com> <4C1102D4.6080105@moonspot.net> <4C110501.1090906@mageekbox.net> <4C1108CE.2090308@lerdorf.com> In-Reply-To: <4C1108CE.2090308@lerdorf.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Gearman support for php-fpm? From: brian@moonspot.net (Brian Moon) > [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. Brian.