parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Benchmark of: -j0


From: Ole Tange
Subject: Re: Benchmark of: -j0
Date: Mon, 13 Feb 2017 10:56:54 +0100

On Sun, Feb 12, 2017 at 5:48 PM, Hans Schou <hans.schou@gmail.com> wrote:

> Should one use -j default or -j0 ?

It depends.

If the goal is to replace code where you want to run as many jobs in
parallel as possible, then -j0 is a good choice. So if you want to
replace the code below and still want them all to run in parallel, -j0
would be the best choice:

echo "x" &
echo "y" &
echo "z" &
.....
echo "Z" &
wait

However, if you optimize for speed then it becomes more complex.

http://stackoverflow.com/a/37972317/363028
http://stackoverflow.com/a/40757613/363028
https://oletange.wordpress.com/2015/07/04/parallel-disk-io-is-it-faster/

(TL;DR: The conclusion is to measure - do not assume).


/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]