You are not logged in.
Pages: 1
Hi there everyone!
I've searched and read a bunch but I'm having a problem figuring out what, exactly, top is telling me about the machine I'm running it on.
The machine is an i7 2.66 (listed as 4 core/8 thread) with 16GB of ram running Deb 9.
You can find the top in question here
I've been watching this for the day to see if the fivem process I'm running it taking to much of a toll for the machine.
The process at the top says it's using 32% of CPU. Load at the top says .24/.12 .
Then there's this line:
%Cpu(s): 2.4 us, 0.6 sy, 0.0 ni, 96.8 id, 0.1 wa, 0.0 hi, 0.1 si, 0.0 st
I'm having problems bringing all of this together for an informed picture of what the server load really is.
Could someone help me out by dropping a knowledge bomb on me?
Thanks!
Last edited by schwim (2018-06-22 18:40:18)
Schw.im! A social site with an identity crisis.
Offline
^For the top output: see this.
In particular, it seems your cpu is 96.8% not used (at the moment).
As for the question: "what the server load is" is not precise question enough IMHO, which is typical for such questions. For example:
- what should be included in "server load" (i/o load? cpu load? network i/o?
- what time span should we consider? (last second? last minute? last microsecond?)
...
Hope this helps.
Postpone all your duties; if you die, you won't have to do them ..
Offline
HI there imbecil and thanks a bunch for the help!
I do have somewhat of an understanding for the load averages, Reading my topic, I was very unclear in what confused me(not including the line I posted that you explained).
My load averages show .10 to .25, which on a quad core processor, should mean I'm averaging a quarter of that number in capacity (4.0 being 100 computing capacity). The top process, however, shows 30% and that is pretty stable over the 15 minutes. What does that 32% cpu represent? Clearly, not capacity and it doesn't even jive with the capacity of a single core.
I'm confused at the dichotomy between the load and the cpu used on that process.
Schw.im! A social site with an identity crisis.
Offline
I've been watching this for the day to see if the fivem process I'm running it taking to much of a toll for the machine.
For a better way than top to count performance events and such, you could try perf (performance analysis tools for Linux)
Perf is kernel version dependent, so you want the meta package:
apt-get install linux-perfFor a simple analysis over a period of time, start the process using:
perf stat <program>in a terminal. When you close the program, the output will show in the terminal window.
Example:
perf stat thunar
Performance counter stats for 'thunar':
505.618444 task-clock:u (msec) # 0.056 CPUs utilized
0 context-switches:u # 0.000 K/sec
0 cpu-migrations:u # 0.000 K/sec
4,098 page-faults:u # 0.008 M/sec
740,350,986 cycles:u # 1.464 GHz
636,657,206 instructions:u # 0.86 insn per cycle
123,804,133 branches:u # 244.857 M/sec
4,374,851 branch-misses:u # 3.53% of all branches
9.044618080 seconds time elapsedThere are a HUGE number of ways to use perf, including extra unstable programs available in the repos.
I note you said server. You can also start perf on already running instances. See here for details: https://perf.wiki.kernel.org/index.php/Tutorial
Offline
The top process, however, shows 30% and that is pretty stable over the 15 minutes. What does that 32% cpu represent?
That is the tasks share of the amount of CPU use. So its's like 32% of the 2.4% being used (my math may not be precise, but that's how I think of it).
The man page for top has some details about each category that may clear things up.
You must unlearn what you have learned.
-- yoda
Offline
Load averages and CPU utilization (really the % of a time frame the CPU spends on the listed task times) are different. %CPU is likewise a share of time (just want to emphasize this, as it's obviously different than %MEM).
I'm learning all sorts of good stuff here:)
Trying to get a better grip on this. When I use perf to show cpu%, I get different numbers than top.
perf top -nKs pid PerfTop: 5880 irqs/sec kernel:98.9% exact: 0.0% [3500Hz cycles:pp], (all, 2 CPUs)
------------------------------------------------------------------------------------------------------
49.41% 35060 0:swapper
25.93% 12967 543:Xorg
6.60% 5074 5384:x-www-browser
5.60% 3256 771:conky
2.53% 1826 7724:x-terminal-emul
2.11% 1516 725:clipit
1.20% 647 741:conky
0.57% 513 5398:BgHangManager
0.50% 390 424:NetworkManager
0.47% 463 8181:perf
0.38% 350 8178:perf
0.37% 334 2315:irq/17-b43
0.37% 275 5400:Timer
0.35% 324 818:conky
0.34% 224 8186:modprobe
0.32% 224 8187:modprobe
0.28% 187 8182:sh
0.25% 182 7400:x-terminal-emul
0.24% 202 7694:kworker/1:0
0.23% 178 968:ntpd
0.22% 165 7448:kworker/0:0
0.19% 140 8184:modprobe
0.18% 147 7230:kworker/u4:1
0.16% 120 825:conky
0.15% 77 407:irqbalance
0.14% 98 419:dbus-daemon
0.11% 92 748:conky
0.11% 84 8185:modprobe
0.10% 92 824:conky
0.10% 55 8183:cat
0.08% 49 840:gdbus
0.08% 80 820:conky
0.07% 49 812:nm-applet
0.06% 64 720:tint2
0.05% 36 822:conky
0.04% 28 14:watchdog/1
0.03% 39 7:rcu_sched
0.03% 28 15:migration/1
0.03% 20 6851:kworker/u4:0
0.02% 18 11:watchdog/0
My question is: Why does the cpu% in top show 2.4% for xorg, while the above shows 25.93%?
is top showing the % of the total available, while perf is showing the % within that 2.4%?
If a new thread is necessary, let me know.
Last edited by sleekmason (2018-06-24 19:58:32)
Offline
Pages: 1