Run Your Command Line Tools On Multiple Threads With MParallel

Image: lordmulder

Command line tools can provide more power and flexibility over a graphical front-end, especially for the likes of ImageMagick and FFmpeg. Unfortunately, while some of these utilities are multi-threaded, core utilisation isn't the best when running more than one instance. This is where MParallel steps in, allowing you to explicitly parallelise these tasks.

Designed for the Windows command line, feeding MParallel input is very straightforward. You can either string commands together using colons:

MParallel.exe --count=3 ping.exe -n 16 : ping.exe -n 16 : ping.exe -n 16

Or via a text file, containing commands on separate lines:

MParallel.exe --count=3 --input=my_commands.txt

The major difference between using MParallel and just executing separate instances yourself (say, via multiple command windows), is the MParallel will attempt to make the best use of your system's available cores.

For converting many images or encoding videos, this will almost always be faster. If you just need a single file processed however, you won't see any gains.

If you'd like to give it a try, compiled binaries are available in 32 and 64-bit versions. Alternative, you can download the source code from GitHub.

MParallel -- Parallel Batch Processor [GitHub, via gHacks]


Be the first to comment on this story!