4

If I run a command with nice, then I can see its process having the expected niceness value:

In one terminal:

nice sleep 17

and in another one:

$ ps -aoni,comm | grep sleep
 10 sleep

But trying to do the same with GNU parallel (version 20161222, Debian 9.3), I fail:

parallel --nice 10 sleep ::: 17

$ ps -aoni,comm | grep sleep
  0 sleep

I am probably missing something obvious, but what ?

update: perhaps it is just a bug, because it worked with older versions...

1 Answers1

5

You have found a bug. Thanks.

It was introduced in parallel-20160522, and until now did not have any automated testing to check that --nice was working locally.

Next release will have both testing and --nice working.

The workaround for local jobs is to run parallel with nice:

nice -n 18 parallel bzip2 '<' ::: /dev/zero /dev/zero

The bug only affects local jobs: Remote jobs are niced as you would expect.

Ole Tange
  • 35,514
  • Oh, I was wondering about this too, but assumed that it was something I did wrong (I'm not a frequent parallel user). Good! – Kusalananda Feb 06 '18 at 08:32