ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    top -- What is it telling us?

    IT Discussion
    freepbx 14 linux centos 7 top system administration troubleshooting
    4
    24
    3.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EddieJenningsE
      EddieJennings @scottalanmiller
      last edited by

      @scottalanmiller said in top -- What is it telling us?:

      @EddieJennings if you thought that a load of .55 meant 55%, what did you think that 8.0 meant?

      By that logic 800%, which seems impossible; thus, my misunderstanding.

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • EddieJenningsE
        EddieJennings @scottalanmiller
        last edited by

        @scottalanmiller said in top -- What is it telling us?:

        @eddiejennings said in top -- What is it telling us?:

        Great, useful information :D. Could this be a correct analogy for the deep run queue but low CPU percentage?

        The taxi isn't moving (0% CPU) because there's some barrier preventing people from loading into the taxi (and this queue of people gets longer and longer).

        The taxi goes every cycle without fail whether it has a load or not. The taxi never stops. Low CPU % means that there were no passengers to pick up so the taxi was running empty.

        Ah, I see.

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @EddieJennings
          last edited by

          @eddiejennings said in top -- What is it telling us?:

          @scottalanmiller said in top -- What is it telling us?:

          @EddieJennings if you thought that a load of .55 meant 55%, what did you think that 8.0 meant?

          By that logic 800%, which seems impossible; thus, my misunderstanding.

          That's why I felt it was odd that you panicked, given that it couldn't be over 100%, so no reason to assume that 8 was a bad number.

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller
            last edited by

            Even if your machine has a high CPU % and a high load, you still have to test running applications and ask "is it fast enough"? If you have a perfectly planned system, you might easily have a busy CPU and lots of load and no issues at all. Generally you want your CPU % to be high, otherwise it generally means that you didn't size your system correctly and bought something more expensive than you really needed.

            1 Reply Last reply Reply Quote 1
            • DustinB3403D
              DustinB3403
              last edited by

              So I've got a VM here, with 1 vCPU and 2048 MB of ram.

              Here is top of that system.

              top - 15:22:30 up  2:52,  1 user,  load average: 0.00, 0.01, 0.05
              Tasks: 102 total,   1 running, 101 sleeping,   0 stopped,   0 zombie
              %Cpu(s):  0.0 us,  0.3 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
              KiB Mem :  1883884 total,   365780 free,   445932 used,  1072172 buff/cache
              KiB Swap:   839676 total,   839676 free,        0 used.  1188012 avail Mem
              
                PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
               1336 mysql     20   0 1102624 113756   9976 S  0.3  6.0   0:05.04 mysqld
              	1 root      20   0  128164   6820   4060 S  0.0  0.4   0:02.47 systemd
              	2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd
              	3 root      20   0       0      0      0 S  0.0  0.0   0:00.12 ksoftirqd/0
              	5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H
              

              I truncated it for shortness. Based on that the CPU is just too fast for the workload. I can't possibly give a VM half a core. . .

              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @DustinB3403
                last edited by scottalanmiller

                @dustinb3403 said in top -- What is it telling us?:

                So I've got a VM here, with 1 vCPU and 2048 MB of ram.

                Here is top of that system.

                top - 15:22:30 up 2:52, 1 user, load average: 0.00, 0.01, 0.05
                Tasks: 102 total, 1 running, 101 sleeping, 0 stopped, 0 zombie
                %Cpu(s): 0.0 us, 0.3 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
                KiB Mem : 1883884 total, 365780 free, 445932 used, 1072172 buff/cache
                KiB Swap: 839676 total, 839676 free, 0 used. 1188012 avail Mem

                PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
                

                1336 mysql 20 0 1102624 113756 9976 S 0.3 6.0 0:05.04 mysqld
                1 root 20 0 128164 6820 4060 S 0.0 0.4 0:02.47 systemd
                2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
                3 root 20 0 0 0 0 S 0.0 0.0 0:00.12 ksoftirqd/0
                5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H

                I truncated it for shortness. Based on that the CPU is just too fast for the workload. I can't possibly give a VM half a core. . .

                It's wasted. If you had more control of the system, you could assign it less CPU. Hypervisors don't actually assign cores, that's a myth.

                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller
                  last edited by

                  Hypervisors present "visible thread processors" which may or may not correlate to actual cores, or thread engines, under the hood. A key purpose of a hypervisor is to allow for a workload to receive less than a single core, or thread engine, of workload. The stnadard use case is for a VM to get far less than full cores or thread engines.

                  What the VM sees and what it is given are very different things. The hypervisor might only give 1/100th of a core, but tell the VM it has two.

                  1 Reply Last reply Reply Quote 0
                  • DustinB3403D
                    DustinB3403
                    last edited by

                    Hrm.. but in any case what is provided here is wasted resources.

                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @DustinB3403
                      last edited by

                      @dustinb3403 said in top -- What is it telling us?:

                      Hrm.. but in any case what is provided here is wasted resources.

                      Correct, assuming that throughput and not latency are what matter to you. Even in the taxi scenario, you might want to run a taxi empty 99% of the time because you only pcik up VIPs and you care more about making sure that VIPs never wait, even for a single trip, that about keeping your taxi running efficiently. In which case you are forced to run your CPU taxi empty nearly always to guarantee that it always has enough capacity for any arriving VIPs.

                      1 Reply Last reply Reply Quote 0
                      • DustinB3403D
                        DustinB3403
                        last edited by

                        Well in this case, it's just wasted. It's the minimum that could be provided and is still overkill for the tasks is has to process.

                        1 Reply Last reply Reply Quote 0
                        • DustinB3403D
                          DustinB3403
                          last edited by

                          Not that there is much that can be done about it.

                          1 Reply Last reply Reply Quote 0
                          • 1
                          • 2
                          • 2 / 2
                          • First post
                            Last post