bug-parallel
[Top][All Lists]
Advanced

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

Re: Command line option to set niceness


From: Ole Tange
Subject: Re: Command line option to set niceness
Date: Tue, 16 Nov 2010 09:24:00 +0100

On Mon, Nov 15, 2010 at 5:33 PM, Rhys Ulerich <address@hidden> wrote:
> Would it be possible to add a command line option, say -n, to cause
> parallel to spawn processes with a modified niceness?  Possibly
> feeding -n with no option would be equivalent to prepending the
> command with nice(1) and -n [#] would adjust the priority per
> nice(1)'s page.
>
> Admittedly, the user can simply use nice wherever desired.  My
> interest is for having $PARALLEL or the configuration file pick this
> up automagically.  That way I don't bring my UI to a grinding halt
> whenever GNU parallel's doing it's thing.

This works:

PARALLEL="nice -n19" parallel bzip2 ::: *

However I see your problem if you wanted everything spawed by GNU
Parallel to be niced. This does not quite work:

PARALLEL="nice -n19" parallel -S .. cat {} '|' bzip2 ::: *

This will only nice cat. Maybe the command could be wrapped similar to:

nice -n19 bash -c 'cat {} | bzip2'

It will need some quoting though.

https://savannah.gnu.org/bugs/index.php?31667

/Ole



reply via email to

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