The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 274β€…    Votes:  3β€…    βœ… Solution
Tags: gpu   conky  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/842214
Title: CPU on Ubuntu running high
ID: /2016/10/27/CPU-on-Ubuntu-running-high
Created: October 27, 2016    Edited:  June 12, 2020
Upload: March 26, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


When you are looking at the CPU% or Load factor you have to divide by the number of CPU Cores x Hyper Threading. So if you have a quad core processor with hyper threading it’s in interpreted as 8 CPU’s.

If your CPU% shows 200% and it is 8 CPUs then your real CPU usage is 25%.

If your load factor show β€œ.92” and you have 8 CPUs then your real load factor is β€œ.115”. In your Conky you would massage your load factor (for 5 minutes, 10 minutes and 15 minutes) by using:

${execpi .001 (awk '{printf "%s/", $1}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $2}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $3}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4}

The Real CPU percentage can never go over 100% and the Real load factor can never go over 1 so you have to mentally do the math dividing by the number of CPUs or use Conky for accurate results instead of Top or whatever program you were using.


Conky vs top screen example

Comparing top CPU% to Conky’s CPU%:

top cpu vs conky cpu.png

Firefox is consuming the most CPU%. In top it is listed at 27.8% in Conky it is listed at 3.37%. Taking Conky’s percentage and multiplying by 8 (the number of CPUs) yields 27%.

⇧ vboxdrv: Fatal error in Kernel 4.8 How is being able to break into any Linux machine through grub2 secure?  β‡©