Welcome to the Linux Foundation Forum!

Practical use of nice/renice

Options

Hi,
Does anyone have a real world example of them using nice/renice?
Why did you use it?
Were you able to measure the effect the new niceness value had?

Comments

  • coop
    coop Posts: 915
    Options

    you can easily see the nice values of everything on your system either by using "top" where the third column shows priority and the fourth the nice value (which really is just priority - 20) You can see the same thing with "ps elf". Within top you can change the niceness of a process if it is yours (or if you are superuser, for anyone) in top by typing "r" and following the prompts, or you can do it in "gnome-system-monitor". If you want to see the effect of niceness, you can run a CPU intenstive task at different nice values and time it; you will generally find the total CPU time consumed doesn't change much but the wall clock time will change. This is a little tricky as if you don't have a busy system even low priority tasks will run right away so you have to do it on a system that is already kind of saturated. Straightforward but too compilcated to do here. We do such a lab exercise in our Linux kernel course in the scheduling discussion.

Categories

Upcoming Training