0

I want to see the real change in process launch and execution after changing nice value. When i allocate lower nice value to process, what changes should i see.

$ps -l |head -2
  UID   PID  PPID        F CPU PRI NI       SZ    RSS WCHAN     S        
  501 25164 25144     4006   0  31 10  4280144   1584 -      SN+   

I executed

$renice -6 25164

and i got new value of NICENESS as -6 ,it was 10 before

ps -l |head -2
  UID   PID  PPID        F CPU PRI NI       SZ    RSS WCHAN     S        
  501 25164 25144     4006   0  31 -6  4280144   1584 -      S<+    

So, what changes i should see now. i.e Should it increase processing speed . or launch time will be less.

$renice -6 pid

I want to see the changes in process execution time, as it gets higher priority .What benefit user will get?

shellter
  • 36,525
  • 7
  • 83
  • 90
  • 1
    StackOverflow is dedicated to helping solve programming code problems. Your Q seems more appropriate for https://unix.stackexchange.com, but read their help section regarding on-topic questions . AND please read [Help On-topic](https://stackoverflow.com/Help/On-topic) and [Help How-to-ask](https://stackoverflow.com/Help/How-to-ask) before posting more Qs here. Good luck. – shellter Aug 23 '19 at 15:11

1 Answers1

1

You will only see a difference in execution time if the cpu is fully utilized since the niceness affects the priority of a process. So to benchmark a difference you will need to run some other program that fully utilizes the cpu and then run the program you are benchmarking. Then change the niceness so that the priority is now more or less than the other program and you will then see a difference in execution time.

maschaub
  • 752
  • 4
  • 10