Q: niceness of a background process Do background process have different nice given? I noticed it is not having the default 0. This might be a problem because it is having less priority.. does anyone know how to change this behavior? I run the java via below start script and no there is no nice called inside that script.
nohup ./start.sh &
F S   UID    PID   PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
0 S  5330  12759      1  0  84   4 -  3283 -      ?        00:00:00 start.sh
0 S  5330  12772  12759  1  84   4 - 1462473 -    ?        00:19:12 java


A: The user running this script is starting it in the background from an interactive ksh shell session.
The ksh shell has a shell option called bgnice, which in ksh93 is on by default, which causes the shell to start background jobs with a non-zero niceness value (it will be 4 higher than the shell the job is started from).
This is from the ksh93 manual:

bgnice  All background jobs are run at a lower priority.
         This is the default mode.

To turn this option off, use
set +o bgnice

In some variants of the ksh shell (e.g. pdksh, and possibly mksh), the option is still available, but not set by default.
