You are here: Re: PHP CLI & Forking children « PHP Programming Language « IT news, forums, messages
Re: PHP CLI & Forking children

Posted by qwertycat on 09/29/07 19:32

On Sep 29, 7:51 pm, Jerry Stuckle <jstuck...@attglobal.net> 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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация