Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On Ubuntu server load graphs I see 4 types of CPU consumption: User, System, Nice and Idle.

What does Nice type mean?

share|improve this question
    
We fixed high nice% on one of our Dell RedHat servers by disabling PowerNow in the BIOS. Nice went from 45% to 10%. Reboot required of course. –  user180166 Jul 3 '13 at 11:59

4 Answers 4

up vote 13 down vote accepted

It is the CPU scheduling priority, higher vales (+19) mean lower priority, and lower values (-20) mean higher priority (inverse relationship). man 2 getpriority will give you lots of details. You can set the nice value when launching a process with the nice command and then change it with the renice command. Only the superuser (root) can specify a priority increase of a process.

share|improve this answer
7  
This explicates what nice means but not what the "nice CPU time" in top means. –  fossilet Feb 19 at 3:25

On a CPU utilization graph or report, the "nice" CPU percentage is the % of CPU time occupied by user level processes with a positive nice value (lower scheduling priority -- see man nice for details).

Basically it's CPU time that's currently "in use", but if a normal (nice value 0) or high-priority (negative nice value) process comes along those programs will be kicked off the CPU.

share|improve this answer
    
I upvoted, but correct me if I'm wrong: I got this from man 1 iostat `` %nice: Show the percentage of CPU utilization that occurred while executing at the user level with nice priority.``. It seem not CPU time. –  HVNSweeting Dec 2 '13 at 15:44
2  
@HVNSweeting "time" in the "time sharing system" ("scheduler time") sense, not the "hands moving on the clock on the wall" sense. Over a long enough duration at steady state they're roughly equivalent: A machine that's up for 3 years with a steady-state CPU utilization will accumulate roughly that percentage of its wall-clock uptime in the appropriate buckets. The number of seconds is a less useful metric than "scheduler time" (% of a given number of cycles spent in each bucket) though. –  voretaq7 Dec 2 '13 at 21:35

Nice is intended for batch or background jobs. Jobs are niced (given lower scheduling priority) so they don't use CPU when online users could be using it. The nice and renice programs set the nice priority. Negative nice priorities are bad (real-time).

If your have low idle time but a lot of nice time, then you are likely running a background process like Seti at Home or something else similar.

share|improve this answer

%user: Percentage of CPU utilization that occurred while executing at the user level (application).

%nice: Percentage of CPU utilization that occurred while executing at the user level with nice priority.

%system: Percentage of CPU utilization that occurred while executing at the system level (kernel).

%iowait: Percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.

%idle: Percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.

Source: http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html

See also man mpstat.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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