in reply to Parallel::ForkManager and CPU usage?
Since each process is “processing images,” you will probably be able to run quite a few more processes than you have cores, because each process will spend most of its time waiting for disk-I/O. The amount of memory won’t be outrageous, either. You should arrange for the number of processes to be adjustable. Fiddle with it to find the “sweet spot” for your system.
And, if you are on a Unix/Linux system, don’t forget the -N numprocs parameter of good ol’ xargs. You could write a simple Perl script that expects the name of a file on the command-line and which processes just one file. Then, build a file with a list of all the filenames (or pipe an ls command output), and feed that into xargs. The job is done, in multi-process style, but without writing any complicated Perl code. Maybe just the ticket if this is a “one-off” task?
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parallel::ForkManager and CPU usage?
by Jenda (Abbot) on Sep 21, 2014 at 01:56 UTC | |
|
Re^2: Parallel::ForkManager and CPU usage?
by karlgoethebier (Abbot) on Sep 20, 2014 at 18:02 UTC | |
| |
|
Re^2: Parallel::ForkManager and CPU usage?
by trippledubs (Deacon) on Sep 23, 2014 at 02:09 UTC |