On Fri, Jul 18, 2003 at 02:45:29PM +0100, Iain Tatch wrote:
> CW>  1. what's happening
> 
> Perl is doing nothing more than calling your operating system's underlying
> fork() call -- see `man 2 fork'.

Do that, and on Linux you'll see this:

       Under Linux, fork is implemented using copy-on-write pages, so the only
       penalty incurred by fork is the time and memory required  to duplicate
       the parent's page tables, and to create a unique task structure for the
       child.

Copy-on-write means that your kid processes have may have a lot of memory
allocated, but until they or the parent change the data it's only used once
by the operative system. So if you have 10 child processes using 10 MB memory
each, they may be using less than 100 MB together since they have the exact
same memory pages allocated.

So make sure that you are actually using as much memory as you think you
are before you try making your kiddies smaller, it may well be that you
haven't got a problem.

-- 
niklas nordebo -><- [EMAIL PROTECTED]
Holy Shit! You must die to preserve life on Earth as we know it!

Reply via email to