summaryrefslogtreecommitdiffstats
path: root/scripts/oe-pylint
diff options
context:
space:
mode:
authorAryaman Gupta <aryaman.gupta@windriver.com>2022-06-22 15:21:03 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-29 16:16:56 +0100
commitac162116b365900925bd753ae264847f751ce799 (patch)
tree15ad4cad296ba4c48202fd3db63d8e7cd0da3940 /scripts/oe-pylint
parentba6160f2e0e6cade77ec9075f7d913db3099cbdb (diff)
downloadpoky-ac162116b365900925bd753ae264847f751ce799.tar.gz
buildstats.py: enable collection of /proc/pressure data
The Linux pressure monitoring system helps determine when system resources are being overutilized by measuring how contended the CPU, IO and memory are. This information can be found under /proc/pressure/ which contains 3 files - cpu, memory and io. In each of the files, the format is as follows: some avg10=70.24 avg60=68.52 avg300=69.91 total=3559632828 full avg10=57.59 avg60=58.06 avg300=60.38 total=3300487258 The "some" state of a given resource represents when one or more tasks are delayed on that resource whereas the "full" state represents when all the tasks are delayed. Currently, we only collect data from the "some" state but the "full" data can simply be appended to the log files if neccessary. The "avg10", "avg60" and "avg300" fields represent the average percentage of time runnable tasks were delayed in the last 10, 60 or 300 seconds respectively. The "total" field represents the total time, in microseconds, that some runnable task was delayed on a resource. More information can be found at: https://www.kernel.org/doc/html/latest/accounting/psi.html and in the source code under kernel/sched/psi.c This commit adds functionality to collect and log the "some" CPU, memory and IO pressure. The "avg10", "avg60" and "avg300" fields are logged without change. In place of the "total" field, the difference between the current "total" and the previous sample's "total" is logged, allowing the measurement of pressure in between each polling interval, as was done for /proc/stat data. The log files are stored in: <build_name>/tmp/buildstats/<build_time>/reduced_proc_pressure/{cpu,io,memory}.log mirroring the directory structure of /proc/pressure. If the /proc/pressure directory does not exist or the resource files can't be read/opened, the reduced_proc_pressure directory is not created. (From OE-Core rev: 061931520b8baa7f3a03bf466aa9ec8bf995bc14) Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com> Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-pylint')
0 files changed, 0 insertions, 0 deletions