0

If I wanted to give my main system, desktop cinnamon, the highest priority, which PID should I set this for?

The reason is because I have a program that runs for days and would hog up all the resources to a point where I can't even move my mouse. It calls several programs on demand so its difficult to set which program to lower priority. When it runs I can't do anything else. Thus I'm wonder if I can just give my window the highest priority instead? thanks!

Ahdee

0

The process that eats up the most CPU in normal usage is probably the X server. First, find the pid (Process ID) of your X process:

ps aux | grep /usr/bin/X

This will give you a line starting with root [pid] ....

Now, let's increase the priority:

sudo renice -5 [pid]

This sets the priority to 20 (the default priority) minus 5 (the nice value), resulting in a total priority of 15. The lower the priority number, the more often the process will be scheduled for processing. You can check the priority with the top command. Experiment until you are satisfied. However, renice is a dangerous command and may make your system unusable (until a reboot).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.