On 2021-03-07 3:58 p.m., Sakib Sajal wrote:
oe-timeout-dd-test tries to write <count> number of
kilobytes to the filesystem within a specified
<timeout>. The purporse of this script is to find
s/purporse/purpose/
which part of the build system puts stress on the
filesystem io and log all the processes.


To use and monitor a build, add to local.conf:
BB_HEARTBEAT_EVENT = "<interval to log data>"
BB_LOG_HOST_STAT_ON_INTERVAL = "1"
BB_LOG_HOST_STAT_CMDS = "oe-timeout-dd-test.sh <timeout> <count>"

Log can be found at:
$TMPDIR/buildstats/<build_number>/host_stats file.

Signed-off-by: Sakib Sajal <[email protected]>
---
  scripts/oe-timeout-dd-test.sh | 26 ++++++++++++++++++++++++++
  1 file changed, 26 insertions(+)
  create mode 100644 scripts/oe-timeout-dd-test.sh

diff --git a/scripts/oe-timeout-dd-test.sh b/scripts/oe-timeout-dd-test.sh
new file mode 100644
index 0000000000..40b3948c32
--- /dev/null
+++ b/scripts/oe-timeout-dd-test.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# oe-timeout-dd-test tries to write <count> number of
+# kilobytes to the filesystem within a specified time
+# constraint. The purporse of this script is to find
s/purporse/purpose/
+# which part of the build system puts stress on the
+# filesystem io and log all the processes.
s/./when that happens./

It's probably worth pointing out that <timeout> is a floating point
number and maybe provide typical values such as with a HB interval of
15 seconds, and 0.5s timeout and 100 KB IO, the result is
no triggers on an isolated system whereas say ?0.1?s and 100 KB IO
results in several triggers. The idea is to give people a starting
point.
+
+usage() {
+        echo "Usage: $0 <timeout> <count>"
+}
+
+if [ $# -ne 2 ]; then
+        usage
+        exit 1
+fi
+
+timeout $1 dd if=/dev/zero of=/tmp/foo bs=1024 count=$2 >/dev/null 2>&1
+
+if [ $? -ne 0 ]
+then
+        top -b -n 1
+else
+        echo "success"

Do we need this else part? It'll just fill up the logs?

+fi
+

What values have you tried and how did that work out?
On Friday, a build with 100KB and was it .5 seconds and didn't
see any event exceed the timeout, right? We also ran several builds
out of a shared local sstate-cache and didn't see any event exceed the timeout, iirc.

../Randy









--
# Randy MacLeod
# Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149101): 
https://lists.openembedded.org/g/openembedded-core/message/149101
Mute This Topic: https://lists.openembedded.org/mt/81158947/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to