aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/025-i64-cost/ab-sessions.sh
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-30 17:59:47 +0100
committereunhhu <[email protected]>2026-09-30 17:59:47 +0100
commit402c19311b247889b36ff3be834d9fab19555af7 (patch)
treee243c7b97b8bdaf894c0487ccbcfc4def633f5d4 /research/experiments/025-i64-cost/ab-sessions.sh
parent07047c391f32c43827c0da145f6c89edb5007941 (diff)
downloadpure-402c19311b247889b36ff3be834d9fab19555af7.tar.gz
pure-402c19311b247889b36ff3be834d9fab19555af7.zip
Count instructions where timing cannot tell 3% apart (110)
016's second stage passed its criterion: six interleaved pairs against ee21aec gave TPC-C (RAM, W=1) -0.6% at the median and the bank's queries 0.0% to +2.2%, no run interfered. The ranks query was slower all six times, and chasing it showed that on this Pi timing cannot separate 1-3%: two servers asked in turns disagree with themselves (ee21aec to e02bfc9 +1.6%, e02bfc9 to 481642f -1.2%, ee21aec to 481642f +2.8%), and a query whose instructions grew 0.6% ran 3.5% faster. Instructions do not move so: pcount.c counts the server's user-mode instructions with perf_event_open (no perf here), and psample.c samples where they go. ranks had grown 0.4% in instructions (the rest was where code and data landed), per_branch 3.6% and tables 20 instructions a row, which 07047c3 halved. The six pairs of 07047c3 were interfered (another session's build, load 4-12) and are kept apart, unused.
Diffstat (limited to 'research/experiments/025-i64-cost/ab-sessions.sh')
-rwxr-xr-xresearch/experiments/025-i64-cost/ab-sessions.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/research/experiments/025-i64-cost/ab-sessions.sh b/research/experiments/025-i64-cost/ab-sessions.sh
new file mode 100755
index 0000000..b4b5b1d
--- /dev/null
+++ b/research/experiments/025-i64-cost/ab-sessions.sh
@@ -0,0 +1,13 @@
+#!/bin/zsh
+# ab-sessions.sh DIR A B SESSIONS: ab.py on fresh processes each session,
+# pure-serve-A and pure-serve-B from DIR, which starts first alternating;
+# each session waits for a load average below 2.
+here=${0:A:h}
+dir=$1 a=$2 b=$3 n=$4
+for i in $(seq 1 $n); do
+ until [ "$(cut -d' ' -f1 /proc/loadavg | cut -d. -f1)" -lt 2 ]; do sleep 5; done
+ if (( i % 2 )); then first=$a second=$b; else first=$b second=$a; fi
+ echo "== session $i first=$first $(cut -d' ' -f1-3 /proc/loadavg)"
+ python3 $here/ab.py $dir/pure-serve-$first $dir/pure-serve-$second 6 30 2>&1
+done
+echo "== end"