Solved

What is the relation of nice and priority in Linux?

Posted on 2011-09-23
1
336 Views
Last Modified: 2012-05-12
Hello, I would to understand the relationship of nice and priority in Linux, as per my current knowledge the nice value range is 19 to -20, where -20 is the highest number to set for high priority CPU scheduling. Could someone please explain me how is the priority number is affected by the nice value? Thanks!
0
Comment
Question by:beer9
1 Comment
 
LVL 9

Accepted Solution

by:
_3mp3ror_ earned 500 total points
ID: 36590800
The nice command allows programs to be started at a lower or higher than normal scheduling priority.
This allows you to control which processes the kernel should favor when dividing processor time among running programs.
Processes with the lowest nice number are executed with the highest priority and vice versa.

On most systems, priority levels for normal users range from 0 to 19, with 0 being the highest priority and 19 being the lowest priority. The root user can create processes with a range of -20 (highest) to 19 (lowest).
Most programs start with a nice level of 0 by default. Critical system services usually have a negative nice level so that they are always given preference over user programs.

This quote  is from a realy good book which is free btw. If you are new to linux commands I highly recommend it.
http://dontfearthecommandline.blogspot.com/
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux redhat 7.2 10 89
installing docker on ubuntu 6 36
How to mount nfs share on this CentOS server? 6 42
how to include conditional log rotate in liunx. 17 36
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question