4 this program is inspired by the functionality of GNU parallel, but tries
5 to keep low overhead and follow the UNIX philosophy of doing one thing well.
10 basically, it works by processing stdin, launching one process per line.
11 the actual line can be passed to the started program as an argv.
12 this allows for easy parallelization of standard unix tasks.
14 it is possible to save the current processed line, so when the task is killed
15 it can be continued later.
20 you have a list of things, and a tool that processes a single thing.
22 cat things.list | jobflow -threads=8 -exec ./mytask {}
24 seq 100 | jobflow -threads=100 -exec echo {}
26 cat urls.txt | jobflow -threads=32 -exec wget {}
28 find . -name '*.bmp' | jobflow -threads=8 -exec bmp2jpeg {.}.bmp {.}.jpg
30 run jobflow without arguments to see a list of possible command line options,
31 and argument permutations.
33 Comparison with GNU parallel
34 ----------------------------
36 GNU parallel is written in perl, which has the following disadvantages:
37 - requires a perl installation
38 even though most people already have perl installed anyway, installing it
39 just for this purpose requires up to 50 MB storage (and potentially up to
40 several hours of time to compile it from source on slow devices)
41 - requires a lot of time on startup (parsing sources, etc)
42 - requires a lot of memory (typically between 5-60 MB)
44 jobflow OTOH is written in C, which has numerous advantages.
45 - once compiled to a tiny static binary, can be used without 3rd party stuff
46 - very little and constant memory usage (typically a few KB)
48 - much higher execution speed
50 apart from the chosen language and related performance differences, the
51 following other differences exist between GNU parallel and jobflow:
53 + supports rlimits passed to started processes
54 - doesn't support ssh (usage of remote cpus)
55 - doesn't support all kinds of argument permutations:
56 while GNU parallel has a rich set of options to permute the input,
57 this doesn't adhere to the UNIX philosophy.
58 jobflow can achieve the same result by passing the unmodified input
59 to a user-created script that does the required permutations with other
65 grab the latest release tarball from the releases page, and just run `make`.
66 it contains all library dependencies.
67 https://github.com/rofl0r/jobflow/releases
69 instructions to build from git:
74 git clone https://github.com/rofl0r/libulz lib
75 git clone https://github.com/rofl0r/jobflow
76 git clone https://github.com/rofl0r/rcb
77 export PATH=$PATH:/tmp/jobflow-0000/rcb
78 ln -s /tmp/jobflow-0000/rcb/rcb.pl /tmp/jobflow-0000/rcb/rcb
80 CC="gcc -static" CFLAGS="-O0 -g -Wall -Wextra" rcb jobflow.c