Ubuntu – CPU on Ubuntu running high


In the terminal I used "top" to check the processes and how much of the CPU was being used as I thought max was 100%, so I restored 292,000 photos with recoverjpeg on my sda1 HDD, I opened the folder and the Nautalis is fluctuating between 130% and 170% , should I close the program and am I at risk of my gpu locking up ?

Best Answer

  • 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%.

  • Related Question