Often you want to raise or lower process priorities in Linux. You can do this with the nice and renice commands. The more nice a process is the less taxing it is on the CPU and the slower it goes. Lowering the nice level gives more CPU resources to the task effectively raising it's priority. Having a high nice number results in the opposite.
- [Narrator] Linux process priorities…are handled by a system called nice.…Nice levels go from -1 to -19 for privileged users.…The scale goes from 0 to 19 for nonprivileged users.…The default nice lever is zero.…When a process is started it has a default nice level.…The nice level is the number that reflects…how nice the process is to the CPU.…The nicer a process is to the CPU,…the less it interrupts it and the lower it's priority is.…
Because the process is getting fewer resources…from the CPU, it also has lower priority.…This means other processes will get more CPU time…than it will.…If the nice level is less than zero…then it is less nice to the CPU…and demands more resources from it.…Thus having a higher priority for CPU time.…In summary, the higher the nice number,…the lower the CPU priority.…The lower the nice number, the higher the CPU priority.…Let's go to terminal to see how this works.…
If we want to start a process…with a predetermined nice level,…we can start it with a nice command.…I'm going to open a second terminal…
- Topics include:
- Shell tips and tricks
- Pattern matching with globs
- Pattern matching with extended globs
- Using the Bash shell
- Monitoring processes using ps
- Monitoring processes graphically
- Managing processes
- Job scheduling
- Limiting access to AT and cron jobs
- Managing system services
Skill Level Intermediate
Linux: User and Group Managementwith Grant McWilliams1h 8m Intermediate
1. Linux Shells Overview
2. Using the Bash Shell
3. Linux Processes
4. Job Scheduling
5. System Services
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.