in reply to Re: No Performance gain with Parallel::ForkManager
in thread No Performance gain with Parallel::ForkManager

...and interestingly the unforked script does the job in about half the execution time.

...because the unforked process isn't causing your disk heads to seek back and forth repeatedly as each forked process grinds away at the same physical resource.

Sometimes forked processes work like a bucket brigade where the person filling the buckets does it very quickly, and hands them off to the workers who have to run from the water source to the fire and back before they request another full bucket. Other times, it works more like the person doing the filling is standing next to the fire, and has to keep running back and forth between the workers and the water source. You might be in the second situation.


Dave

  • Comment on Re^2: No Performance gain with Parallel::ForkManager

Replies are listed 'Best First'.
Re^3: No Performance gain with Parallel::ForkManager
by walto (Pilgrim) on Feb 23, 2014 at 19:46 UTC
    Yes, since the script is basically reading and writing mp3 tags it has mostly IO processes. And as you mentioned the bottleneck is the hard disk. It would be different if there are more computational processes.