Skip to content
Snippets Groups Projects
Commit 6a689b46 authored by Peter Cai's avatar Peter Cai
Browse files

Update perf stat format, and add batched autorun script

parent 46c7266a
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Automatically run the set of experiments allowed on the current kernel
# Saves a little bit of work, though this is not really adaptable to other
# environments.
run_exp() {
echo "Running: ./run.sh --force $@"
echo "----------------------------------------------"
./run.sh --force $@
if [ "$RUN_AUX_EXP" == "true" ]; then
for i in $(seq 1 10); do
echo "Running: ./run.sh --aux $i $@"
./run.sh --aux $i $@
done
fi
}
# Common functions for memcached experiments
# Note that for some cases we can only run part of them;
# in that case we use run_exp directly instead of these helpers
run_memcached_qps_scan() {
[ "$SKIP_QPS_SCAN" == "true" ] && echo "Memcached QPS scan skipped" && return
[ "$SKIP_SINGLE_THREAD" == "true" ] || run_exp -e memcached_qps_scan -t 1 $@
run_exp -e memcached_qps_scan -t 8 $@
}
run_memcached_conn_scan() {
[ "$SKIP_SINGLE_THREAD" == "true" ] || run_exp -e memcached_conn_scan -t 1 $@
run_exp -e memcached_conn_scan -t 8 $@
}
[ "$UID" -ne 0 ] && exit 1
case "$(uname -r)" in
5.15.79-peter)
# Custom kernel -- most things that matter can be run here
# Default -- no tuning
run_memcached_conn_scan
run_memcached_qps_scan
# Kernel polling
run_memcached_conn_scan --extra-tuning kernel_polling
run_memcached_qps_scan --extra-tuning kernel_polling
# IRQ packing
SKIP_SINGLE_THREAD=true run_memcached_conn_scan --extra-tuning irq_packing
SKIP_SINGLE_THREAD=true run_memcached_qps_scan --extra-tuning irq_packing
;;
*)
echo "Unsupported kernel"
;;
esac
perf_stat_start() {
$PERF stat -C 0-$((THREADS - 1)) -e LLC-load-misses:u,LLC-load-misses:k,mem_load_uops_retired.llc_miss,mem_uops_retired.all_loads,cycles,cycles:u,cycles:k,instructions,instructions:u,instructions:k,stalled-cycles-frontend,stalled-cycles-backend -o "$DATA_OUT/stat_$1$EXP_AUX_SUFFIX.txt" &
$PERF stat -C 0-$((THREADS - 1)) -e LLC-load-misses:u,LLC-load-misses:k,LLC-loads:u,LLC-loads:k,LLC-store-misses:u,LLC-store-misses:k,LLC-stores:u,LLC-stores:k,task-clock,cycles:u,cycles:k,instructions:u,instructions:k -o "$DATA_OUT/stat_$1$EXP_AUX_SUFFIX.txt" &
PERF_STAT_PID=$!
}
......
......@@ -138,9 +138,8 @@ if [ -d "$DATA_OUT" ] && [ -z "$EXP_AUX_SUFFIX" ]; then
echo "Experiment directory $DATA_OUT already exists. Remove it manually or use --force. To run auxillary experiments for multiple sets of data, use --aux <num>"
exit 1
fi
else
mkdir -p "$DATA_OUT"
fi
mkdir -p "$DATA_OUT"
run_exp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment