diff options
| author | eunhhu <[email protected]> | 2026-09-30 17:59:47 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-30 17:59:47 +0100 |
| commit | 402c19311b247889b36ff3be834d9fab19555af7 (patch) | |
| tree | e243c7b97b8bdaf894c0487ccbcfc4def633f5d4 /research/experiments/025-i64-cost/runs.sh | |
| parent | 07047c391f32c43827c0da145f6c89edb5007941 (diff) | |
| download | pure-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/runs.sh')
| -rwxr-xr-x | research/experiments/025-i64-cost/runs.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/research/experiments/025-i64-cost/runs.sh b/research/experiments/025-i64-cost/runs.sh new file mode 100755 index 0000000..328e11f --- /dev/null +++ b/research/experiments/025-i64-cost/runs.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# The runs of docs/design/016's second stage, from the repository's root: +# pure-serve before i64 (9a03e72, built in a scratch worktree) and after (the +# tree as it is), in turns: TPC-C in RAM (W=1, 64 terminals), then the bank's +# queries, six rounds, the order flipped every other round. The modules are +# the same bytes on both sides (aup before and after i64 builds tpcc.aup, +# bank.aup and the four queries alike), so only the runtime differs. The +# results go to a directory named for the after commit: runs.sh fc65d66. +set -e +out=research/experiments/025-i64-cost/$1 +mkdir -p $out +work=$(mktemp -d) +git worktree add -q --detach $work/tree 9a03e72 +make -C $work/tree -s build/pure-serve +cp $work/tree/build/pure-serve $work/pure-serve-before +git worktree remove --force $work/tree +make -s build/pure-serve +cp build/pure-serve $work/pure-serve-after +for round in 1 2 3 4 5 6; do + first=before second=after + if [ $((round % 2)) = 0 ]; then first=after second=before; fi + for version in $first $second; do + echo "$round $version $(uptime)" >> $out/2026-09-30-load.txt + python3 benchmarks/tpcc/run.py --serve $work/pure-serve-$version --warehouses 1 --check 0 --terminals 64 \ + --sqlite-threads '' --sqlite-group '' --seconds 20 > $out/2026-09-30-tpcc-$version-$round-linux-aarch64.jsonl + python3 benchmarks/bank/queries.py --serve $work/pure-serve-$version \ + > $out/2026-09-30-queries-$version-$round-linux-aarch64.jsonl + done +done |
