summaryrefslogtreecommitdiffstats
path: root/run_all_dis.sh
blob: f2a4dd5418d06890d7c34113ade9cf7622c4964c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
# Copyright 2020 Joshua Bakita
# Runs DIS in every configuration needed
# for the paper and schedulability studies

maxJobs=$1
runID=$2
coreCPU=${3:-15}
threadCPU=${4:-31}

if [ $# -lt 2 ]; then
    echo "Usage $0 <number of iterations> <run ID> <core CPU ID> <thread CPU ID>"
    echo "CPU IDs are optional, otherwise assumed to be 15 and 31 respectively."
    exit
fi
if [[ "$EUID" != 0 ]]; then
    echo "You need to be root to enable spatial isolation!"
    exit
fi
date

# Configure libextra for benchmarking
sed -i "s/LITMUS 1/LITMUS 0/g" extra.h

# Run the pairs baseline and some comparisons to examine the effect of less cache
echo "Building benchmarks in unpaired configuration..."
cd dis
make baseline -j30 > /dev/null # Suppress noisy output
echo "Done. Running experiments..."
# Full L3, full L2 - xi is the baseline for the pairs
baseXI=dis/$(date +"%b%d-%H")-c-xi-$runID.txt
echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b dis2MbInNames.txt -B -I xi $runID
# Half L3, full L2 - i3 sees effect of half L3
baseI3=dis/$(date +"%b%d-%H")-c-i3-$runID.txt
echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b dis2MbInNames.txt -B -I i3 $runID
# Half L3, half L2 - additional effect of half L2
baseI=dis/$(date +"%b%d-%H")-c-i-$runID.txt
echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b dis2MbInNames.txt -B -I i $runID
date

# Run the Level-C pairs
pairC=dis/$(date +"%b%d-%H")-c-xi-async-$runID.txt
echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b dis2MbInNames.txt -B -I xi -A $runID
date

# Run the Level-A/-B pairs
echo "Building benchmarks in paired configuration..."
make pairs -j30 > /dev/null # Suppress noisy output
echo "Done. Continuing experiments..."
# No cache isolation
pairXI=dis/$(date +"%b%d-%H")-c-xi-$runID"-A.txt and -B.txt"
echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b disPairs2MbInNames.txt -B -I xi $runID
# Shared L2, split L3
pairI3=dis/$(date +"%b%d-%H")-c-i3-$runID"-A.txt and -B.txt"
echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b disPairs2MbInNames.txt -B -I i3 $runID
# Split L2, split L3
pairI=dis/$(date +"%b%d-%H")-c-i-$runID"-A.txt and -B.txt"
echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b disPairs2MbInNames.txt -B -I i $runID
date

echo "==== DONE ===="
echo "Results are in:"
echo "- dis/$baseXI"
echo "- dis/$baseI3"
echo "- dis/$baseI"
echo "- dis/$pairXI"
echo "- dis/$pairI3"
echo "- dis/$pairI"
echo "- dis/$pairC"