Linux Process Management Made Easy: Understanding nice and renice
The Linux Crash Course series here on Learn Linux TV teaches you a valuable Linux-related skill in each and every video. You can watch most episodes in any order, and with over 60 entries in this series (and counting) there’s no shortage of Linux Learning! In this episode, Jay will teach you some of the basics of tuning Linux processes with the nice and renice commands.
*Thanks to Akamai for sponsoring this video!*
Support Learn Linux TV by spinning up your own Linux server on their cloud platform ➜ https://learnlinux.link/akamai
*Become a Channel Member*
Show your support for Linux learning and get early access to select videos, member-only livestreams, and more! ➜ https://learnlinux.link/member
*Support Learn Linux TV in other ways (commission earned)*
• Become a Patron ➜ https://learnlinux.link/patron
• 5% discount on LPI exam vouchers ➜ https://learnlinux.link/lpi-voucher
• Affiliate store ➜ https://learnlinux.link/amazon
• Latest book: Mastering Ubuntu Server ➜ http://ubuntuserverbook.com
• Awesome Pi-powered KVM ➜ https://learnlinux.link/tinypilot
*Time Codes*
00:00 – Intro
01:16 – Set up your own Linux server with Akamai! (Sponsor)
02:38 – Quick refresher on the ps command
03:42 – Understanding the output of the ps command
04:50 – Making sense of “niceness” values
07:13 – Example of changing the priority of a process in Linux
10:49 – Further exploring the renice command
12:22 – Setting process priority with the nice command
13:59 – Another key difference between the nice and renice commands
*Boost your Linux skills with these stand-alone tutorials*
• Essential tweaks for ALL Linux Servers ➜ https://linux.video/all-servers
• Use Ventoy to create a multi-distro flash drive ➜ https://linux.video/ventoy
• Browse the web from within your Linux terminal ➜ https://linux.video/term-web
• From Zero to Proxmox ➜ https://linux.video/zero-to-pve
• Check out Neovim ➜ https://linux.video/neovim
• Systemd Deep Dive ➜ https://linux.video/systemd
• Systemd Timers ➜ https://youtu.be/n6BuUgkZ5T0
• Installing an operating system for Raspberry Pi ➜ https://linux.video/pi-imager
• Connecting to a Linux server via ssh ➜ https://linux.video/ssh
• Linux permissions ➜ https://linux.video/perms
• OpenSSH Guide ➜ https://linux.video/ssh-guide
• 10 Linux Terminal Tips and Tricks ➜ https://linux.video/cli-tricks-1
• Over 15 Terminal Tricks ➜ https://linux.video/cli-tricks-2
*Full Courses from Learn Linux TV*
• Linux Crash Course series ➜ https://linux.video/cc
• Learn how to exit use tmux ➜ https://linux.video/tmux
• Learn how to use vim ➜ https://linux.video/vim
• Bash Scripting Series ➜ https://linux.video/bash
• Proxmox VE Cluster Full Course ➜ https://linux.video/pve
• Learn Ansible ➜ https://linux.video/ansible
*Linux-related Podcasts*
• Enterprise Linux Security ➜ https://enterpriselinuxsecurity.show
• The Homelab Show ➜ https://thehomelab.show
*Learn Linux TV on the Web*
• Main site ➜ https://www.learnlinux.tv
• Community ➜ https://community.learnlinux.tv
• Enterprise Linux Security Podcast ➜ https://enterpriselinuxsecurity.show
• The Homelab Show Podcast ➜ https://thehomelab.show
• Content Ethics ➜ https://www.learnlinux.tv/content-ethics
• Request Assistance ➜ https://www.learnlinux.tv/request-assistance
*Disclaimer*
Learn Linux TV produces technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). Learn Linux TV is not responsible for any damages that may arise from any use of this content.
#CloudComputing #DevOps #Linux
by Learn Linux TV
linux web server
🎯 Key Takeaways for quick navigation:
00:01 🚀 Introduction to Linux Crash Course Series
– Introduction to the Linux Crash Course series on Learn Linux TV.
– Each video covers an important Linux-related concept.
– Emphasis on standalone videos for flexible learning.
02:29 💻 Sponsor Message: Aami Connected Cloud
– Aami Connected Cloud as an affordable, flexible, and reliable cloud provider.
– Quick setup of Linux servers with a variety of features.
– Marketplace with over 100 applications for easy deployment.
03:37 🔄 Understanding Process Priority
– Using the PS command to determine current process priorities.
– Explaining the priority and niess columns in the PS command output.
– Introduction to the concepts of niess values and process priority.
08:20 ⬆️ Increasing Process Priority with "renice"
– Using the "renice" command to increase the priority of a running process.
– Demonstrating how to change priority values and their impact.
– Highlighting the need for sudo when increasing process priority.
09:56 ⬇️ Decreasing Process Priority with "renice"
– Using the "renice" command to decrease the priority of a running process.
– Showing the impact of lowering the priority on process execution.
– Noting the absence of sudo when decreasing process priority.
11:49 🔄 Alternative Syntax for "renice"
– Highlighting differences in syntax between "nice" and "renice" commands.
– Demonstrating an example of setting process priority without using "-n."
– Emphasizing the need for consistency in command syntax.
13:10 ➕ Setting Priority for New Processes with "nice"
– Using the "nice" command to set priority for a new process.
– Launching Vim with a specified priority and examining the process.
– Contrasting the syntax of "nice" with "renice" for new processes.
14:34 🔄 Syntax Variation: "nice" vs. "renice"
– Discussing syntax differences between "nice" and "renice" commands.
– Demonstrating an example of using "nice" for launching a new process.
– Emphasizing the importance of using "-n" with "nice" for setting priority.
15:31 🎓 Conclusion and Call to Action
– Recap of the basics of setting process priority in Linux.
– Expressing gratitude for watching the Linux Crash Course series.
– Encouraging viewers to like, subscribe, and stay tuned for more content.
–
What are some practical scenarios where adjusting process priority in Linux would be beneficial?
How does the concept of process priority discussed in the video relate to system performance optimization?
Can you provide examples of other Linux commands that are used for managing processes and system resources?
Made with HARPA AI
Pretty sure nice doesn't go to to 20. You said that several times. -20 to +19. Those plots the zero in the middle make a nice round 40 levels.
Nice shirt!!!
Outstanding video and great description of nice and renice. It's very confusing the way nice and priority values are counter-intuitive, but you presented it well so even I can understand.
Question – if I change the nice/priority of a process with sub-processes, will this change automatically for the sub-processes as well? Eg: I'm running Kdenlive and the rendering engine uses the process named "melt" with dozens of sub-process. Do I have to renice them all, or the the top one?
Jay, can you make a video on why and how to track different logs files to diagnose different things? Thank you.
Very (re)nice!
❤❤❤❤
Seriously this channel is the best. The amount of free knowledge available is wild.
Thanks Jay!!!
I just bought your book.
Well, actually, I was just notified that someone bought it for me off of my Amazon Christmas Wishlist. lol
Is there any particular way you think I should read it? Or is it good to just go cover to cover?
Thanks! Love your content!
Also I want one of your t-shirts or hoodies they are awesome! Cant afford them rn though just bought all my Christmas presents 🙁 maybe in a few months.
Just bought a Linux Fan sub tho!