orion777 wrote:Good evening!
I was migrating to the latest version of the assembly. Now I'm getting extremelly high loads reported, however we know that RPI3 has onle 4 kernels..
How to understand it?
For more than you ever wanted to know on Linux load averages ^-^, see
this Wikipedia article, and "
Linux Load Averages: Solving the Mystery" by Brendan Gregg. From the latter (emphasis added):
I grew up with OSes where load averages meant CPU load averages, so the Linux version has always bothered me. Perhaps the real problem all along is that the words "load averages" are about as ambiguous as "I/O". Which type of I/O? Disk I/O? File system I/O? Network I/O? ... Likewise, which load averages? CPU load averages? System load averages? Clarifying it this way lets me make sense of it like this:
- On Linux, load averages are (or try to be) "system load averages", for the system as a whole, measuring the number of threads that are working and waiting to work (CPU, disk, uninterruptible locks). Put differently, it measures the number of threads that aren't completely idle. Advantage: includes demand for different resources.
- On other OSes, load averages are "CPU load averages", measuring the number of CPU running + CPU runnable threads. Advantage: can be easier to understand and reason about (for CPUs only).
Note that 'disk, uninterruptible locks' part... from the Wikipedia article (emphasis added):
An idle computer has a load number of 0 (the idle process isn't counted). Each process using or waiting for CPU (the ready queue or run queue) increments the load number by 1. Each process that terminates decrements it by 1. Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux also includes processes in uninterruptible sleep states (usually waiting for disk activity), which can lead to markedly different results if many processes remain blocked in I/O due to a busy or stalled I/O system.[1] This, for example, includes processes blocking due to an NFS server failure or too slow media (e.g., USB 1.x storage devices). Such circumstances can result in an elevated load average which does not reflect an actual increase in CPU use (but still gives an idea of how long users have to wait).
Translating this somewhat liberally, a load of 14.1 (the first number in your load average list) on a 4 core processor means that over the last minute (in an exponentially averaged sense) there were 14.1/4 =
3.5 runnable or I/O blocked threads per core.
The system is indeed highly loaded, but much of it probably relates to the @world update triggered by genup (see below) trying to merge large numbers of binary packages to a slow I/O subsystem (e.g. your RPi3's microSD card). Note that by default though, genup runs emerges at maximum niceness (minimum system priority), so although your machine may become sluggish, it shouldn't completely lock up when an update is happening - if one of those "ready to run" threads is e.g. due to the GUI, that will have higher priority than the emerge-related threads, and get CPU time (unless the system is swapping heavily of course, in which case the GUI-related thread may need to wait on the - presumably stalled - I/O for necessary swap pages, and then you
will experience some stalling; this is one good reason to put your swap on a separate bus from your sysroot, as
ericbish notes).
orion777 wrote:And one more question: if I was installing specific version of some software, will it be updated to the latest version during genup?
The process followed by genup is described in its
manpage. The important line is:
- updates all packages in the @world set (using emerge --deep --with-bdeps=y --changed-use --update @world)
Now, if you manually install a
particular version of a package, but take no other action, Portage will record only the
generic package atom in your world file (/var/lib/portage/world).
For example, at the moment, dev-util/diffstat is available in two versions in the main Gentoo tree:
Code: Select all
pi64 ~ # eix -e diffstat
* dev-util/diffstat
Available versions: 1.60 (~)1.61
Homepage: http://invisible-island.net/diffstat/
Description: Display a histogram of diff changes
Suppose you chose to emerge the 1.60 specifically, with:
Code: Select all
pi64 ~ # emerge -v =dev-util/diffstat-1.60
Then dev-util/diffstat-1.60 would be duly installed, but:
Code: Select all
pi64 ~ # grep diffstat /var/lib/portage/world
dev-util/diffstat
No mention of the version.
So, since there is a valid (on ~arm64)
newer version in the tree,
it will be upgraded (along with any other packages) when you run genup. Incidentally, eix knows this (the '
' means eligible for upgrade):Code: Select all
pi64 ~ # eix -e diffstat
[U] dev-util/diffstat
Available versions: 1.60{tbz2} (~)1.61
Installed versions: 1.60{tbz2}(12:30:07 AM 04/30/2018)
Homepage: http://invisible-island.net/diffstat/
Description: Display a histogram of diff changes
If you wanted to 'pin' diffstat-1.60 (to prevent an upgrade, which for manually installed packages may trigger a lengthy compile on your machine during genup, since there is no matching binary package on the binhost), you could e.g. create a file /etc/portage/package.mask/diffstat with the contents:
Code: Select all
<dev-util/diffstat-1.60
>dev-util/diffstat-1.60
(there are other ways to achieve this, of course). Now run eix again:
Code: Select all
pi64 ~ # eix -e diffstat
[I] dev-util/diffstat
Available versions: 1.60{tbz2} [m](~)1.61
Installed versions: 1.60{tbz2}(12:30:07 AM 04/30/2018)
Homepage: http://invisible-island.net/diffstat/
Description: Display a histogram of diff changes
That "
" indicates that Portage no longer "sees" any valid upgrade candidate (because your masks exclude 1.61, as shown by the "[m]").
Hope that makes sense!
Edit: PS you can always use the "top" command to get an idea of what is loading your system.