[Raleigh-talk] Parallel::ForkManager and progress

Michael Peters mpeters at plusthree.com
Fri Dec 19 10:56:00 PST 2008


I've got a long running batch process that uses Parallel::ForkManager to split the work up and take 
advantage of the multiple CPU/Cores on the box. This part works fine (have I mentioned how much I 
love P::FM?). But I'd like to have some sort of a running progress on the screen when run manually.

So, any ideas on how best to do this? Since each worker is a separate process I could use something 
like Net::Shared or IPC::ShareLite to collect stats that are then reported on. Anyone have any 
success with these modules or have recommendations on shared memory modules?

I've also thought about using the database to store the progress. That has the benefit of being 
something I can query even if the process isn't being run manually. But it has the drawback of 
having to connect to the database (which won't be on the same machine) and sending it lots of little 
queries to update a couple of counters.

Thoughts?
-- 
Michael Peters
Plus Three, LP



More information about the Raleigh-talk mailing list