I've never used Parallel::ForkManager, so I can't comment on your code. But it may be that you're beating your database into submission. It could be thrashing badly.
When you run operations in parallel, it's common to see the average runtime of each query increase, but when it increases overmuch, it's time to start looking at your queries. You should take a look at your database structure (relationships, table definitions, triggers, etc.) and compare it with your query to see if you're doing things efficiently. Are you using your indexes effectively? It may be that you can significantly shrink the runtime by computing a table of partial results and then querying that, for example.
...roboticus
In reply to Re: fork-ing : my lack of understanding
by roboticus
in thread fork-ing : my lack of understanding
by ethrbunny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |