I was thinking of an additional option that would automatically decrease
-n so that the requested number of processes is started (then of course
the load may not be well balanced).
So you mean, rather than the current situation of:
$ yes . | head -n13 | xargs -n4 -P2
. . . .
. . . .
. . . .
.
xargs could try to distribute like:
$ yes . | head -n13 | xargs -n4 -P2
. . . .
. . . .
. . .
. .
No, more like
seq 1 13 | xargs --parallel -P4
1 5 9 13
2 6 10
3 7 11
4 8 12
(Note there's no -n). Same for
seq 1 13 | xargs --parallel
on a 4-core machine. This is _by design_ rearranging files, so it
requires an option.
Paolo