How to Interpret Load Average in Linux (Linux Crash Course Series)

Поділитися
Вставка
  • Опубліковано 17 чер 2024
  • The "Load Average" within our Linux servers and workstations enables administrators to understand how well the system is keeping up with its workload. By reading the values within the Load Average, we can also determine the overall performance of the system over several time periods, which will give us an idea on how the workloads are progressing. In this video, Jay will teach you how to fetch the current load average, and how to read the values.
    Thanks to Linode for sponsoring this video!
    Check them out and get your very own Linux server ➜ learnlinux.link/akamai
    Brand LPI Linux Essentials Course Available
    Check out the new course on Udemy! ➜ learnlinux.link/lpi-course
    ➜ learnlinux.link/lpi-course
    Check out the Linux Shop
    In the official shop, you'll find Shirts, hats, stickers, bags and more!
    ➜ merch.learnlinux.tv
    5% discount on LPI exam vouchers
    After you finish Jay's new course, get 5% off an LPI exam voucher here:
    ➜ learnlinux.link/lpi-voucher
    Become a Patron
    Show your support for Learn Linux TV on Patreon and get access to exclusive perks!
    ➜ learnlinux.link/patron
    Become a Channel Member
    Show your support for Learn Linux TV here on UA-cam and get access to exclusive perks!
    ➜ learnlinux.link/member
    Mastering Ubuntu Server: 4th Edition
    Jay's latest book covers everything you need to know in order to master Ubuntu Server. It's available here:
    ➜ ubuntuserverbook.com
    Linux Gear and Kits
    Check out Jay's choice of hardware products, audio/video equipment, and more.
    ➜ learnlinux.link/amazon
    Grab an awesome Pi-powered KVM
    Support Learn Linux TV and grab yourself a TinyPilot KVM here:
    ➜ learnlinux.link/tinypilot
    Note: Royalties and/or commission is earned from each of the above links
    Linux-related Gifts
    • Mastering Ubuntu Server 4th Edition (Jay wrote that!!! 😲) ➜ ubuntuserverbook.com
    • Affiliate store for Linux compatible hardware/accessories ➜ learnlinux.link/amazon
    • Awesome KVM for your Homelab ➜ learnlinux.link/tinypilot
    Time Codes
    00:00 - Intro
    00:51 - Get your very own Linux server with Linode (sponsor) f learnlinux.link/akamai
    02:20 - Which command(s) can you use to find the load average?
    04:10 - Understanding what the three load average values represent
    05:18 - Determining how many CPUs your server or workstation has
    07:22 - What constitutes a high load average?
    10:39 - Which load average period should you pay the most attention to?
    Full Courses from Learn Linux TV
    • Linux Essentials Certification Workshop ➜ learnlinux.link/lpi-course
    • Linux Crash Course series ➜ linux.video/cc
    • Learn how to use tmux ➜ linux.video/tmux
    • Learn how to use vim ➜ linux.video/vim
    • Bash Scripting Series ➜ linux.video/bash
    • Proxmox VE Cluster Full Course ➜ linux.video/pve
    • Learn Ansible ➜ linux.video/ansible
    Boost your Linux skills with these stand-alone tutorials
    • Essential tweaks for ALL Linux Servers ➜ linux.video/all-servers
    • Use Ventoy to create a multi-distro flash drive ➜ linux.video/ventoy
    • Browse the web from within your Linux terminal ➜ linux.video/term-web
    • From Zero to Proxmox ➜ linux.video/zero-to-pve
    • Check out Neovim ➜ linux.video/neovim
    • Systemd Deep Dive ➜ linux.video/systemd
    • Systemd Timers ➜ • Automate Your Tasks wi...
    • Installing an operating system for Raspberry Pi ➜ linux.video/pi-imager
    • Connecting to a Linux server via ssh ➜ linux.video/ssh
    • Linux permissions ➜ linux.video/perms
    • OpenSSH Guide ➜ linux.video/ssh-guide
    • 10 Linux Terminal Tips and Tricks ➜ linux.video/cli-tricks-1
    • Over 15 Terminal Tricks ➜ linux.video/cli-tricks-2
    Linux-related Podcasts
    • Enterprise Linux Security ➜ enterpriselinuxsecurity.show
    • The Homelab Show ➜ thehomelab.show
    Learn Linux TV on the Web
    • Main site ➜ www.learnlinux.tv
    • Community ➜ community.learnlinux.tv
    • Enterprise Linux Security Podcast ➜ enterpriselinuxsecurity.show
    • The Homelab Show Podcast ➜ thehomelab.show
    • Content Ethics ➜ www.learnlinux.tv/content-ethics
    • Request Assistance ➜ www.learnlinux.tv/request-ass...
    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.
    #LinuxTutorial #LoadAverage #Linux
  • Наука та технологія

КОМЕНТАРІ • 50

  • @aaronperl
    @aaronperl Рік тому +6

    I liked your grocery store analogy. When I worked in customer support (defect support for a large commercial software product), we had spikes in activity (incoming customer calls) occasionally, but we were able to eventually catch up while the incoming volume was lower/more normal. Over time, the number of incoming calls increased (in part due to the, uh... evolving quality of the product and new releases, as well as increasing numbers of customers), and the "spikes" started to become the new "normal" volume. Unfortunately, management was very slow at hiring new people, so we got more and more overwhelmed, as our load average grew ever higher. Eventually people started leaving (CPU cores burning out? 😁 ), which made the load even higher on the remaining people.
    I've since moved on to other things, and I'm enjoying my work a lot more than I did when I was in that job. I do credit it for helping me to get into my later positions, though.
    Anyway, just wanted to say I did like your analogy, I thought it illustrates the concept well. I've been using Linux for 24 years now, and I knew a higher load average is "bad", or at least hints at a potentially overloaded system, but I always got confused about how to actually interpret it. I guess the idea that "1 means 100%" comes from the days of single-core systems. This video definitely helped me to understand what's really going on.

  • @alvarezd
    @alvarezd 2 місяці тому

    This video helped me understand linux load average concept very well. Thanks!

  • @abubua8781
    @abubua8781 Рік тому +5

    The number of processors can also be found by the command " nproc " which can be installed be various packages, eg coreutils

  • @Kanthon
    @Kanthon Рік тому

    I ordered a hard copy of your book last night. Keep up the good work, sir.

  • @Xcr-oj5ih
    @Xcr-oj5ih Рік тому +2

    I see @abu bua mentioned "nproc" as an alternate for processor info.
    "lscpu" can be used as well. It is usualy installed on most Linux distros, but can be installed as part of the "util-linux" package if not on your system.
    Thank you Jay... Awesome information. I have learned 80% of my Linux commands from watching your videos and reading comments.

  • @Im.Tabachnik
    @Im.Tabachnik Рік тому +2

    This is the Best Video on this Topic! Thank you again for awesome videos!

  • @BehzodSabirov
    @BehzodSabirov Рік тому +7

    From my experience, the load average also starts to grow when RAM runs out and processes start to eat into the swap file, which affects disk IO

  • @jorgeorozco935
    @jorgeorozco935 11 місяців тому

    Awesome video, i liked the simple way you explained the topic

  • @bobwong8268
    @bobwong8268 Рік тому +2

    👍👍👍👍👍
    Thank you very much Jay, learnt something New & Useful today😊

  • @sussusamogus7831
    @sussusamogus7831 8 місяців тому

    clear and nice as always

  • @undergrounder
    @undergrounder Рік тому

    Great video, thank you!

  • @13thravenpurple94
    @13thravenpurple94 Рік тому

    Great work 🥳🥳🥳 Thank you 💜💜💜

  • @dragomirmari
    @dragomirmari Рік тому

    Really helpful video!!!

  • @shahidhiraj2613
    @shahidhiraj2613 Рік тому

    Thank you very much for detailed explanation, just to add on we can use nproc command to find number of processors

  • @brads2041
    @brads2041 Рік тому

    Great video. Have not understood this

  • @PowerUsr1
    @PowerUsr1 Рік тому

    You’re right. The supermarket analogy worked

  • @brandongraham3509
    @brandongraham3509 Рік тому

    Love the supermarket analogy

  • @TheCuteworm
    @TheCuteworm Рік тому +1

    平衡 ... mmm... you really nailed it.

  • @anoldslowhorse
    @anoldslowhorse Рік тому

    really interesting, thanks ...

  • @ahmedghallab5342
    @ahmedghallab5342 2 місяці тому

    شكرا Thanks it was very helpful

  • @aniscuet016
    @aniscuet016 Рік тому +1

    Thanks for the video, it's awesome! A question! how did you make your BASH CLI so nice? what did you use? Thanks!

  • @abhimudaliar1064
    @abhimudaliar1064 Місяць тому

    Thank you.

  • @DL-xf3ur
    @DL-xf3ur Рік тому

    Awesome as always Jay - Is it the number of CPUs or Cores that has to be reached in the load average for it to be 100% used. I noticed you said 2 for your example but your cpuinfo shows that you have a multicore system. Thanks!

  • @shabadabadoo4326
    @shabadabadoo4326 Рік тому +2

    The percentage analogy is ALWAYS a bad one, when looking at load average. It is the average number of processes queued to be handled by cpu package, over a given length of time(1, 5 and 15 minutes as you mentioned). This is distinctly different from determining capacity, because it is NOT how many processes actually handled over that time. Only how many are queued for cpu, over that time. A load avg of 4 on a quad core cpu, doesn't mean the cpu is at 100% capacity. The way processes are managed in the kernel, means linux can adequately manage a number of processes well over the number of cpu cores. To know if the load is high, takes a much more holistic approach to troubleshooting, involving consideration of CPU states.

  • @mihai6564
    @mihai6564 Рік тому

    good video

  • @cleightthejw2202
    @cleightthejw2202 Рік тому +2

    @Jay Just wanted to say you a great job with these vids Jay.
    And I also wanted to put a comment down just in case it truly does help with the algorithm stuff and your channel being promoted/recommended by GoogleTube..

  • @ericjohnson5990
    @ericjohnson5990 Рік тому

    Hey Jay! Have you tried the system 76 darter pro recently? I ask because I just purchased one and wanted to know your thoughts on it.

  • @MarkusHobelsberger
    @MarkusHobelsberger Рік тому +5

    I think load average is not only measured by CPU workload. It can also increase when there is a disk I/O bottleneck. I usually encounter very high load averages during specific backup jobs of folders with many small files from mechanical drives while the actual CPU utilization is below 30%.

    • @christopherjackson2157
      @christopherjackson2157 Рік тому +3

      Thats how I understand it. The more processes waiting to be completed the higher the load. Any sort of bottleneck should increase load avg

  • @christopherjackson2157
    @christopherjackson2157 Рік тому +2

    I've been doing some performance testing over the past week and you can get load averages that exceed the number of cpus. So loads above 100 percent by this measurement. I believe load avg is determined by the number of processes waiting to be completed so it shouldn't exceed number of cpus when working normally. But when ur slamming the system and there's serious bottlenecking that's not necessarily the case. The highest I saw was loads of around 3 on 2 cores (when I started seeing loads above 100 percent I got kinda interested and tried to see how high it could get). Ultimately load avg was more determined by the network interface on the machines than the cpus they had.
    Testing was done on pfsense firewalls and I was trying to see how low power consumption could be pushed without affecting performance. Firewalls are on all the time and spend a lot of that time at very low load if ur not servicing users at all hours.

    • @LearnLinuxTV
      @LearnLinuxTV  Рік тому +1

      Correct, the load average can go above the number of CPUs. I’ve seen it go to 500 and higher, to the point where the CPU is so pegged it can’t even authenticate an SSH session so you can even connect to it and fix it.

    • @christopherjackson2157
      @christopherjackson2157 Рік тому

      @@LearnLinuxTV I still think the 100 percent measurement is useful. As I understand it it's at that point that users will start noticing and making calls to IT

  • @paulov9626
    @paulov9626 8 місяців тому

    Nice analogy. BTW why not use the following one liner instead of scrolling up and down in /proc/cpuinfo:
    cat /proc/cpuinfo | grep -i 'cpu cores'

  • @BrianLongoria
    @BrianLongoria Рік тому

    Cool

  • @giovannicordova4803
    @giovannicordova4803 Рік тому +1

    Do those numbers still apply when using a virtual machine?

  • @rashie
    @rashie Рік тому

    👍👍

  • @Rahul79821
    @Rahul79821 Рік тому

    One can also run nproc to find out number of cores they have.

  • @ChrisPavey85
    @ChrisPavey85 Рік тому +1

    If you run 'grep -c "processor" /proc/cpuinfo' it will return the number of logical CPUs

  • @guilherme5094
    @guilherme5094 Рік тому

    👍

  • @FinderX
    @FinderX Рік тому

    If you know how to use pipe and grep this will help to see how many CPU more easily:
    cat /proc/cpuinfo | grep processor

  • @terryc7142
    @terryc7142 Рік тому

    Why, if you're running a 32-core EPYC CPU, did /proc/cpuinfo show 'cpu cores: 1" ? That makes no sense to me. For this VM, you have at least 2 cores. Shouldn't it say 2 or 32?

  • @josepuga5529
    @josepuga5529 4 місяці тому

    nproc: this simple command tells you how many processor your machine has.

  • @sotecluxan4221
    @sotecluxan4221 Рік тому

  • @kevinding5770
    @kevinding5770 6 місяців тому

    how does load average calculated? when my load average is 12 and I have 8 cpu corea, my android phone is not janky.

  • @mohitsharma-ep9iy
    @mohitsharma-ep9iy 9 місяців тому

    i have 2 cores and 2 threads per core so it makes 4 CPUs , so I have 4 CPUs , so does that mean i have 4 cores or 4 threads , and if it will have 4 threads then why are you saying you have 2 cores because youe have 1 core and 2 threads so that makes it 2 CPUs.
    So please explain this ?

  • @nymnicholas
    @nymnicholas Рік тому

    Wait a min, you have 48 Cores for Desktop and calculations based on load average based with CPU... ok, Overkill. The load then, will never reach 48.0 unless it's trying to compile, maybe the Linux kernel 48 times at 1 go [maybe the only way to know is to try it] Peace :-)

  • @_den_
    @_den_ Рік тому +2

    Once again I wasted my time on you. And you didn't even mention how disk handling affects this parameter.