If I have already started a job with GNU parallel in a similar fashion to:

$ cat jobs | parallel -j 70 "program {};"

is it possible, by e.g. some signal, to adjust the number of jobs of this parallel job? So that I could indicate to parallel that there should now be run at most 75 sub-jobs?



Number of simultaneous jobs


--jobs can read from a file which is re-read when a job finishes:

echo 50% > my_jobs
/usr/bin/time parallel -N0 --jobs my_jobs sleep 1 :::: num128 &
sleep 1
echo 0 > my_jobs

The first second only 50% of the CPU cores will run a job. Then 0 is put into my_jobs and then the rest of the jobs will be started in parallel.

I highly recommend spending an hour walking through the tutorial. Your command line will love you for it.

  • Thanks! Needs a bit of forethought, but I can do that. – gauteh Jul 21 '17 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.