Re: PHP CLI & Forking children
- From: qwertycat@xxxxxxxxxxxxxx
- Date: Sat, 29 Sep 2007 12:32:24 -0700
On Sep 29, 7:51 pm, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:
Just wondering - why do you need to fork processes, anyway? There's a
lot of overhead in doing it, and if they're all CPU bound anyway you
aren't going to gain anything (unless you have a potload of CPU's).
Forking is good if you have different processes using different
resources. But when they have to contend for the same resource,
performance often goes down.
Instead of writing a PHP script that downloads 2 million headers from
a newsgroup in a single connection (which will cause PHP to crash
anyway as it'll reach 500MB+ memory usage), I thought it would be
better to launch 4 processes do download it in chunks of 50,000
headers - with 4 connections to the same NNTP server.
.
- Follow-Ups:
- Re: PHP CLI & Forking children
- From: Andy Hassall
- Re: PHP CLI & Forking children
- From: Jerry Stuckle
- Re: PHP CLI & Forking children
- From: qwertycat
- Re: PHP CLI & Forking children
- References:
- PHP CLI & Forking children
- From: qwertycat
- Re: PHP CLI & Forking children
- From: Andy Hassall
- Re: PHP CLI & Forking children
- From: qwertycat
- Re: PHP CLI & Forking children
- From: Jerry Stuckle
- PHP CLI & Forking children
- Prev by Date: Re: Table schema for user login system?
- Next by Date: Re: PHP CLI & Forking children
- Previous by thread: Re: PHP CLI & Forking children
- Next by thread: Re: PHP CLI & Forking children
- Index(es):
Relevant Pages
|