1

I wanted set low priority to HandBrake in macOS.

I tried to use renice command by pid, but it seems not working. (nice value stays 0)

% ps ax -l | grep Hand
  501 32255     1   0  46  0  3433240 544536 -      R      ??   52:50.69 /Applications/HandBrake.app/Contents/MacOS/HandBrake
% sudo renice -p 32255 -n 10
% ps ax -l | grep Hand
  501 32255     1   0  46  0  3433240 530868 -      R      ??   55:58.62 /Applications/HandBrake.app/Contents/MacOS/HandBrake
% sudo renice -p 32255
% ps ax -l | grep Hand
  501 32255     1   0  46  0  3433184 520424 -      R      ??   62:01.50 /Applications/HandBrake.app/Contents/MacOS/HandBrake

It works by using nice like this.

% nice /Applications/HandBrake.app/Contents/MacOS/HandBrake
% ps ax -l | grep Hand
501 32467 30511   0  46 10  2726256 156284 -      SN+  s004    0:00.67 /Applications/HandBrake.app/Contents/MacOS/HandBrake

Am I doing something wrong?

0

Looking at the man page:

SYNOPSIS

renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]
renice -n increment [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]

It looks like -n and argument should come before -p.
So try:

sudo renice -n 10 -p 32255

Certainly this is the way I do it on macOS Sierra.

2
  • Hi does this still work for you on mac 10.13.4? Your method described above does not seem to have any effect for me (i asked a related question a while ago but got no answers) unix.stackexchange.com/questions/442470/… – Dylanthepiguy May 18 '18 at 0:09
  • @Dylanthepiguy on he face of it it still works. But having read your question I couldn’t say whether it is effective. – forquare May 18 '18 at 7:41

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.