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 ?
-
This old Q&A popped up on radar today. Have you found a suitable explanation to your question yet? If so you can write your own answer with suitable links. If the answer below works you can accept it by clicking the check mark beside it. – WinEunuuchs2Unix Feb 26 '18 at 20:50
1 Answers
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%:
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%.

- 102,282
-
Actually load average can go quite higher than 1. It is simply the average number of processes on the system that want to run, not that are running, so you can easily have many more tasks that want to run than cpus to run them. – psusi Oct 27 '16 at 01:48
-
@psusi Well thank you for that information. Was I mislead to divide the average load factor by 8? This goes back many years so I can't remember the website / posting that recommended this. – WinEunuuchs2Unix Oct 27 '16 at 01:51
-
I'm not quite sure if load average is already done on a per cpu basis or not ( in which case it can make sense to scale it by the number of cpus in the system ), but I do know that it can go much higher than 1, even on a system with only one core. – psusi Oct 27 '16 at 01:55
-
As we type my Conky reads .103, .101 and .106. (5-10-15 min) are those numbers within norm when 8 CPUs are about 10% (mental average looking at 8 bar graphs and percentages in Conky)? – WinEunuuchs2Unix Oct 27 '16 at 02:03
-
It appears that loadavg is not scaled by the number of cores. You can run
stress -c 8
to create 8 processes that each try to use 100% of a core. This quickly leads to a loadavg of 8, because you have 8 processes that always want to run. You can use any number you want with any number of physical cores and will always drive the loadavg to that value. You get .1 with 10% average cpu usage because on average, there is a task that wants to run only 10% of the time is able to do so. With 16 tasks wanting to run, loadavg goes to 16 even though only 8 can run. – psusi Oct 27 '16 at 02:14