forked from haiwan/sledge
parent
1a72791c1b
commit
e32339bbc1
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If already installed, just return
|
||||
[[ -x perf ]] && return 0
|
||||
|
||||
[[ "$(whoami)" != "root" ]] && {
|
||||
echo "Expected to run as root"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Under WSL2, perf has to be installed from source
|
||||
if grep --silent 'WSL2' <(uname -r); then
|
||||
echo "WSL detected. perf must be built from source"
|
||||
echo "WSL2 support is WIP and not currently functional"
|
||||
exit 0
|
||||
|
||||
sudo apt-get install flex bison python3-dev liblzma-dev libnuma-dev zlib1g libperl-dev libgtk2.0-dev libslang2-dev systemtap-sdt-dev libelf-dev binutils-dev libbabeltrace-dev libdw-dev libunwind-dev libiberty-dev --yes
|
||||
git clone --depth 1 https://github.com/microsoft/WSL2-Linux-Kernel ~/WSL2-Linux-Kernel
|
||||
make -Wno-error -j8 -C ~/WSL2-Linux-Kernel/tools/perf
|
||||
sudo cp ~/WSL2-Linux-Kernel/tools/perf/perf /usr/local/bin
|
||||
# rm -rf ~/WSL2-Linux-Kernel
|
||||
else
|
||||
apt-get install "linux-tools-$(uname -r)" linux-tools-generic -y
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,105 +0,0 @@
|
||||
#!/bin/bash
|
||||
source ../common.sh
|
||||
|
||||
# This experiment is intended to document how the level of concurrent requests influence the latency, throughput, and success/failure rate
|
||||
# Use -d flag if running under gdb
|
||||
|
||||
host=localhost
|
||||
timestamp=$(date +%s)
|
||||
experiment_directory=$(pwd)
|
||||
|
||||
results_directory="$experiment_directory/res/$timestamp"
|
||||
log=log.txt
|
||||
|
||||
mkdir -p "$results_directory"
|
||||
log_environment >> "$results_directory/$log"
|
||||
|
||||
inputs=(40 10)
|
||||
duration_sec=60
|
||||
offset=5
|
||||
|
||||
# Execute workloads long enough for runtime to learn excepted execution time
|
||||
echo -n "Running Samples: "
|
||||
for input in ${inputs[*]}; do
|
||||
hey -n 16 -c 4 -t 0 -o csv -m GET -d "$input\n" http://${host}:$((10000 + input))
|
||||
done
|
||||
echo "[DONE]"
|
||||
sleep 5
|
||||
|
||||
echo "Running Experiments"
|
||||
|
||||
# Run lower priority first, then higher priority. The lower priority has offsets to ensure it runs the entire time the high priority is trying to run
|
||||
hey -n 1000 -c 1000 -cpus 6 -t 0 -o csv -m GET -d "40\n" http://${host}:10040 > "$results_directory/fib40-con.csv"
|
||||
sleep $offset
|
||||
hey -n 25000 -c 1000000 -t 0 -o csv -m GET -d "10\n" http://${host}:10010 > "$results_directory/fib10-con.csv" &
|
||||
sleep $((duration_sec + offset + 45))
|
||||
|
||||
# Generate *.csv and *.dat results
|
||||
echo -n "Parsing Results: "
|
||||
|
||||
printf "Payload,Success_Rate\n" >> "$results_directory/success.csv"
|
||||
printf "Payload,Throughput\n" >> "$results_directory/throughput.csv"
|
||||
printf "Payload,p50,p90,p99,p100\n" >> "$results_directory/latency.csv"
|
||||
|
||||
deadlines_ms=(20 20000)
|
||||
# durations_s=(60 70)
|
||||
payloads=(fib10-con fib40-con)
|
||||
|
||||
for ((i = 1; i < 2; i++)); do
|
||||
payload=${payloads[$i]}
|
||||
deadline=${deadlines_ms[$i]}
|
||||
# duration=${durations_s[$i]}
|
||||
|
||||
# Get Number of Requests
|
||||
requests=$(($(wc -l < "$results_directory/$payload.csv") - 1))
|
||||
((requests == 0)) && continue
|
||||
|
||||
# Calculate Success Rate for csv
|
||||
awk -F, '
|
||||
$7 == 200 && ($1 * 1000) <= '"$deadline"' {ok++}
|
||||
END{printf "'"$payload"',%3.5f\n", (ok / (NR - 1) * 100)}
|
||||
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
|
||||
|
||||
# Filter on 200s, convery from s to ms, and sort
|
||||
awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
|
||||
| sort -g > "$results_directory/$payload-response.csv"
|
||||
|
||||
# Get Number of 200s
|
||||
oks=$(wc -l < "$results_directory/$payload-response.csv")
|
||||
((oks == 0)) && continue # If all errors, skip line
|
||||
|
||||
# Get Latest Timestamp
|
||||
# throughput=$(echo "$oks/$duration" | bc)
|
||||
# printf "%s,%f\n" "$payload" "$throughput" >>"$results_directory/throughput.csv"
|
||||
|
||||
# Generate Latency Data for csv
|
||||
awk '
|
||||
BEGIN {
|
||||
sum = 0
|
||||
p50 = int('"$oks"' * 0.5)
|
||||
p90 = int('"$oks"' * 0.9)
|
||||
p99 = int('"$oks"' * 0.99)
|
||||
p100 = '"$oks"'
|
||||
printf "'"$payload"',"
|
||||
}
|
||||
NR==p50 {printf "%1.4f,", $0}
|
||||
NR==p90 {printf "%1.4f,", $0}
|
||||
NR==p99 {printf "%1.4f,", $0}
|
||||
NR==p100 {printf "%1.4f\n", $0}
|
||||
' < "$results_directory/$payload-response.csv" >> "$results_directory/latency.csv"
|
||||
|
||||
# Delete scratch file used for sorting/counting
|
||||
# rm -rf "$results_directory/$payload-response.csv"
|
||||
done
|
||||
|
||||
# Transform csvs to dat files for gnuplot
|
||||
for file in success latency; do
|
||||
echo -n "#" > "$results_directory/$file.dat"
|
||||
tr ',' ' ' < "$results_directory/$file.csv" | column -t >> "$results_directory/$file.dat"
|
||||
done
|
||||
|
||||
# Generate gnuplots. Commented out because we don't have *.gnuplots defined
|
||||
# generate_gnuplots
|
||||
|
||||
# Cleanup, if requires
|
||||
echo "[DONE]"
|
@ -1,109 +0,0 @@
|
||||
#!/bin/bash
|
||||
source ../common.sh
|
||||
|
||||
# This experiment is intended to document how the level of concurrent requests influence the latency, throughput, and success/failure rate
|
||||
# Use -d flag if running under gdb
|
||||
|
||||
host=192.168.1.13
|
||||
# host=localhost
|
||||
timestamp=$(date +%s)
|
||||
experiment_directory=$(pwd)
|
||||
|
||||
results_directory="$experiment_directory/res/$timestamp"
|
||||
log=log.txt
|
||||
|
||||
mkdir -p "$results_directory"
|
||||
log_environment >> "$results_directory/$log"
|
||||
|
||||
inputs=(40 10)
|
||||
duration_sec=30
|
||||
offset=5
|
||||
|
||||
# Execute workloads long enough for runtime to learn excepted execution time
|
||||
echo -n "Running Samples: "
|
||||
for input in ${inputs[*]}; do
|
||||
hey -n 16 -c 4 -t 0 -o csv -m GET -d "$input\n" http://${host}:$((10000 + input))
|
||||
done
|
||||
echo "[DONE]"
|
||||
sleep 5
|
||||
|
||||
echo "Running Experiments"
|
||||
|
||||
# Run lower priority first, then higher priority. The lower priority has offsets to ensure it runs the entire time the high priority is trying to run
|
||||
hey -z $((duration_sec + 2 * offset))s -cpus 3 -c 200 -t 0 -o csv -m GET -d "40\n" http://${host}:10040 > "$results_directory/fib40-con.csv" &
|
||||
sleep $offset
|
||||
hey -z ${duration_sec}s -cpus 3 -c 200 -t 0 -o csv -m GET -d "10\n" http://${host}:10010 > "$results_directory/fib10-con.csv" &
|
||||
sleep $((duration_sec + offset + 15))
|
||||
sleep 30
|
||||
|
||||
# Generate *.csv and *.dat results
|
||||
echo -n "Parsing Results: "
|
||||
|
||||
printf "Payload,Success_Rate\n" >> "$results_directory/success.csv"
|
||||
printf "Payload,Throughput\n" >> "$results_directory/throughput.csv"
|
||||
printf "Payload,p50,p90,p99,p100\n" >> "$results_directory/latency.csv"
|
||||
|
||||
deadlines_ms=(20 20000)
|
||||
payloads=(fib10-con fib40-con)
|
||||
durations_s=(30 40)
|
||||
|
||||
for ((i = 0; i < 2; i++)); do
|
||||
payload=${payloads[$i]}
|
||||
deadline=${deadlines_ms[$i]}
|
||||
duration=${durations_s[$i]}
|
||||
|
||||
# Get Number of Requests
|
||||
requests=$(($(wc -l < "$results_directory/$payload.csv") - 1))
|
||||
((requests == 0)) && continue
|
||||
|
||||
# Calculate Success Rate for csv
|
||||
awk -F, '
|
||||
$7 == 200 {denom++}
|
||||
$7 == 200 && ($1 * 1000) <= '"$deadline"' {ok++}
|
||||
END{printf "'"$payload"',%3.5f\n", (ok / denom * 100)}
|
||||
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
|
||||
|
||||
# Filter on 200s, convery from s to ms, and sort
|
||||
awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
|
||||
| sort -g > "$results_directory/$payload-response.csv"
|
||||
|
||||
# Get Number of 200s
|
||||
oks=$(wc -l < "$results_directory/$payload-response.csv")
|
||||
((oks == 0)) && continue # If all errors, skip line
|
||||
|
||||
# Get Latest Timestamp
|
||||
duration=$(tail -n1 "$results_directory/$payload.csv" | cut -d, -f8)
|
||||
throughput=$(echo "$oks/$duration" | bc)
|
||||
printf "%s,%f\n" "$payload" "$throughput" >> "$results_directory/throughput.csv"
|
||||
|
||||
# Generate Latency Data for csv
|
||||
awk '
|
||||
BEGIN {
|
||||
sum = 0
|
||||
p50 = int('"$oks"' * 0.5)
|
||||
p90 = int('"$oks"' * 0.9)
|
||||
p99 = int('"$oks"' * 0.99)
|
||||
p100 = '"$oks"'
|
||||
printf "'"$payload"',"
|
||||
}
|
||||
NR==p50 {printf "%1.4f,", $0}
|
||||
NR==p90 {printf "%1.4f,", $0}
|
||||
NR==p99 {printf "%1.4f,", $0}
|
||||
NR==p100 {printf "%1.4f\n", $0}
|
||||
' < "$results_directory/$payload-response.csv" >> "$results_directory/latency.csv"
|
||||
|
||||
# Delete scratch file used for sorting/counting
|
||||
# rm -rf "$results_directory/$payload-response.csv"
|
||||
done
|
||||
|
||||
# Transform csvs to dat files for gnuplot
|
||||
for file in success latency throughput; do
|
||||
echo -n "#" > "$results_directory/$file.dat"
|
||||
tr ',' ' ' < "$results_directory/$file.csv" | column -t >> "$results_directory/$file.dat"
|
||||
done
|
||||
|
||||
# Generate gnuplots. Commented out because we don't have *.gnuplots defined
|
||||
# generate_gnuplots
|
||||
|
||||
# Cleanup, if requires
|
||||
echo "[DONE]"
|
@ -1,107 +0,0 @@
|
||||
#!/bin/bash
|
||||
source ../common.sh
|
||||
|
||||
# This experiment is intended to document how the level of concurrent requests influence the latency, throughput, and success/failure rate
|
||||
# Use -d flag if running under gdb
|
||||
|
||||
host=192.168.1.13
|
||||
# host=localhost
|
||||
timestamp=$(date +%s)
|
||||
experiment_directory=$(pwd)
|
||||
|
||||
results_directory="$experiment_directory/res/$timestamp"
|
||||
log=log.txt
|
||||
|
||||
mkdir -p "$results_directory"
|
||||
log_environment >> "$results_directory/$log"
|
||||
|
||||
inputs=(10)
|
||||
duration_sec=30
|
||||
offset=5
|
||||
|
||||
# Execute workloads long enough for runtime to learn excepted execution time
|
||||
echo -n "Running Samples: "
|
||||
hey -n 16 -c 4 -t 0 -o csv -m GET -d "10\n" http://${host}:10010
|
||||
echo "[DONE]"
|
||||
sleep 5
|
||||
|
||||
echo "Running Experiments"
|
||||
|
||||
# Run lower priority first, then higher priority. The lower priority has offsets to ensure it runs the entire time the high priority is trying to run
|
||||
# hey -z $((duration_sec + 2 * offset))s -cpus 3 -c 200 -t 0 -o csv -m GET -d "40\n" http://${host}:10040 >"$results_directory/fib40-con.csv" &
|
||||
# sleep $offset
|
||||
hey -z ${duration_sec}s -cpus 6 -c 400 -t 0 -o csv -m GET -d "10\n" http://${host}:10010 > "$results_directory/fib10-con.csv"
|
||||
# sleep $((duration_sec + offset + 15))
|
||||
# sleep 30
|
||||
|
||||
# Generate *.csv and *.dat results
|
||||
echo -n "Parsing Results: "
|
||||
|
||||
printf "Payload,Success_Rate\n" >> "$results_directory/success.csv"
|
||||
printf "Payload,Throughput\n" >> "$results_directory/throughput.csv"
|
||||
printf "Payload,p50,p90,p99,p100\n" >> "$results_directory/latency.csv"
|
||||
|
||||
deadlines_ms=(20 20000)
|
||||
payloads=(fib10-con fib40-con)
|
||||
durations_s=(30 40)
|
||||
|
||||
for ((i = 0; i < 1; i++)); do
|
||||
payload=${payloads[$i]}
|
||||
deadline=${deadlines_ms[$i]}
|
||||
duration=${durations_s[$i]}
|
||||
|
||||
# Get Number of Requests
|
||||
requests=$(($(wc -l < "$results_directory/$payload.csv") - 1))
|
||||
((requests == 0)) && continue
|
||||
|
||||
# Calculate Success Rate for csv
|
||||
awk -F, '
|
||||
$7 == 200 {denom++}
|
||||
$7 == 200 && ($1 * 1000) <= '"$deadline"' {ok++}
|
||||
END{printf "'"$payload"',%3.5%\n", (ok / denom * 100)}
|
||||
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
|
||||
|
||||
# Filter on 200s, convery from s to ms, and sort
|
||||
awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
|
||||
| sort -g > "$results_directory/$payload-response.csv"
|
||||
|
||||
# Get Number of 200s
|
||||
oks=$(wc -l < "$results_directory/$payload-response.csv")
|
||||
((oks == 0)) && continue # If all errors, skip line
|
||||
|
||||
# Get Latest Timestamp
|
||||
duration=$(tail -n1 "$results_directory/$payload.csv" | cut -d, -f8)
|
||||
throughput=$(echo "$oks/$duration" | bc)
|
||||
printf "%s,%f\n" "$payload" "$throughput" >> "$results_directory/throughput.csv"
|
||||
|
||||
# Generate Latency Data for csv
|
||||
awk '
|
||||
BEGIN {
|
||||
sum = 0
|
||||
p50 = int('"$oks"' * 0.5)
|
||||
p90 = int('"$oks"' * 0.9)
|
||||
p99 = int('"$oks"' * 0.99)
|
||||
p100 = '"$oks"'
|
||||
printf "'"$payload"',"
|
||||
}
|
||||
NR==p50 {printf "%1.4f,", $0}
|
||||
NR==p90 {printf "%1.4f,", $0}
|
||||
NR==p99 {printf "%1.4f,", $0}
|
||||
NR==p100 {printf "%1.4f\n", $0}
|
||||
' < "$results_directory/$payload-response.csv" >> "$results_directory/latency.csv"
|
||||
|
||||
# Delete scratch file used for sorting/counting
|
||||
# rm -rf "$results_directory/$payload-response.csv"
|
||||
done
|
||||
|
||||
# Transform csvs to dat files for gnuplot
|
||||
for file in success latency throughput; do
|
||||
echo -n "#" > "$results_directory/$file.dat"
|
||||
tr ',' ' ' < "$results_directory/$file.csv" | column -t >> "$results_directory/$file.dat"
|
||||
done
|
||||
|
||||
# Generate gnuplots. Commented out because we don't have *.gnuplots defined
|
||||
# generate_gnuplots
|
||||
|
||||
# Cleanup, if requires
|
||||
echo "[DONE]"
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
project_directory=$(cd ../.. && pwd)
|
||||
binary_directory=$(cd "$project_directory"/bin && pwd)
|
||||
|
||||
export LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH"
|
||||
export PATH="$binary_directory:$PATH"
|
||||
|
||||
gdb --eval-command="handle SIGUSR1 nostop" \
|
||||
--eval-command="handle SIGPIPE nostop" \
|
||||
--eval-command="set pagination off" \
|
||||
--eval-command="set substitute-path /sledge/runtime $project_directory" \
|
||||
--eval-command="run $experiment_directory/spec.json" \
|
||||
sledgert
|
@ -1,77 +0,0 @@
|
||||
#!/bin/bash
|
||||
source ../common.sh
|
||||
|
||||
# This experiment is intended to document how the level of concurrent requests influence the latency, throughput, and success/failure rate
|
||||
# Use -d flag if running under gdb
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
results_directory="$experiment_directory/res/1606615320-fifo-adm"
|
||||
|
||||
# Generate *.csv and *.dat results
|
||||
echo -n "Parsing Results: "
|
||||
|
||||
printf "Payload,Success_Rate\n" >> "$results_directory/success.csv"
|
||||
printf "Payload,Throughput\n" >> "$results_directory/throughput.csv"
|
||||
printf "Payload,p50,p90,p99,p100\n" >> "$results_directory/latency.csv"
|
||||
|
||||
deadlines_ms=(20 20000)
|
||||
payloads=(fib10-con fib40-con)
|
||||
|
||||
for ((i = 0; i < 2; i++)); do
|
||||
payload=${payloads[$i]}
|
||||
deadline=${deadlines_ms[$i]}
|
||||
|
||||
# Get Number of Requests
|
||||
requests=$(($(wc -l < "$results_directory/$payload.csv") - 1))
|
||||
((requests == 0)) && continue
|
||||
|
||||
# Calculate Success Rate for csv
|
||||
awk -F, '
|
||||
$7 == 200 && ($1 * 1000) <= '"$deadline"' {ok++}
|
||||
END{printf "'"$payload"',%3.5f\n", (ok / (NR - 1) * 100)}
|
||||
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
|
||||
|
||||
# Filter on 200s, convery from s to ms, and sort
|
||||
awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
|
||||
| sort -g > "$results_directory/$payload-response.csv"
|
||||
|
||||
# Get Number of 200s
|
||||
oks=$(wc -l < "$results_directory/$payload-response.csv")
|
||||
((oks == 0)) && continue # If all errors, skip line
|
||||
|
||||
# Get Latest Timestamp
|
||||
duration=$(tail -n1 "$results_directory/$payload.csv" | cut -d, -f8)
|
||||
throughput=$(echo "$oks/$duration" | bc)
|
||||
printf "%s,%f\n" "$payload" "$throughput" >> "$results_directory/throughput.csv"
|
||||
|
||||
# Generate Latency Data for csv
|
||||
awk '
|
||||
BEGIN {
|
||||
sum = 0
|
||||
p50 = int('"$oks"' * 0.5)
|
||||
p90 = int('"$oks"' * 0.9)
|
||||
p99 = int('"$oks"' * 0.99)
|
||||
p100 = '"$oks"'
|
||||
printf "'"$payload"',"
|
||||
}
|
||||
NR==p50 {printf "%1.4f,", $0}
|
||||
NR==p90 {printf "%1.4f,", $0}
|
||||
NR==p99 {printf "%1.4f,", $0}
|
||||
NR==p100 {printf "%1.4f\n", $0}
|
||||
' < "$results_directory/$payload-response.csv" >> "$results_directory/latency.csv"
|
||||
|
||||
# Delete scratch file used for sorting/counting
|
||||
# rm -rf "$results_directory/$payload-response.csv"
|
||||
done
|
||||
|
||||
# Transform csvs to dat files for gnuplot
|
||||
for file in success latency throughput; do
|
||||
echo -n "#" > "$results_directory/$file.dat"
|
||||
tr ',' ' ' < "$results_directory/$file.csv" | column -t >> "$results_directory/$file.dat"
|
||||
done
|
||||
|
||||
# Generate gnuplots. Commented out because we don't have *.gnuplots defined
|
||||
# generate_gnuplots
|
||||
|
||||
# Cleanup, if requires
|
||||
echo "[DONE]"
|
@ -1,111 +0,0 @@
|
||||
#!/bin/bash
|
||||
source ../common.sh
|
||||
|
||||
# This experiment is intended to document how the level of concurrent requests influence the latency, throughput, and success/failure rate
|
||||
# Use -d flag if running under gdb
|
||||
|
||||
host=192.168.1.13
|
||||
# host=localhost
|
||||
# timestamp=$(date +%s)
|
||||
timestamp=1606697099
|
||||
experiment_directory=$(pwd)
|
||||
binary_directory=$(cd ../../bin && pwd)
|
||||
|
||||
results_directory="$experiment_directory/res/$timestamp"
|
||||
log=log.txt
|
||||
|
||||
mkdir -p "$results_directory"
|
||||
log_environment >> "$results_directory/$log"
|
||||
|
||||
inputs=(40 10)
|
||||
duration_sec=60
|
||||
offset=5
|
||||
|
||||
# Execute workloads long enough for runtime to learn excepted execution time
|
||||
# echo -n "Running Samples: "
|
||||
# for input in ${inputs[*]}; do
|
||||
# hey -n 16 -c 4 -t 0 -o csv -m GET -d "$input\n" http://${host}:$((10000 + input))
|
||||
# done
|
||||
# echo "[DONE]"
|
||||
# sleep 5
|
||||
|
||||
# echo "Running Experiments"
|
||||
|
||||
# # Run lower priority first, then higher priority. The lower priority has offsets to ensure it runs the entire time the high priority is trying to run
|
||||
# hey -z $((duration_sec + 2 * offset))s -cpus 3 -c 200 -t 0 -o csv -m GET -d "40\n" http://${host}:10040 >"$results_directory/fib40-con.csv" &
|
||||
# sleep $offset
|
||||
# hey -z ${duration_sec}s -cpus 3 -c 200 -t 0 -o csv -m GET -d "10\n" http://${host}:10010 >"$results_directory/fib10-con.csv" &
|
||||
# sleep $((duration_sec + offset + 15))
|
||||
# sleep 30
|
||||
|
||||
# Generate *.csv and *.dat results
|
||||
echo -n "Parsing Results: "
|
||||
|
||||
printf "Payload,Success_Rate\n" >> "$results_directory/success.csv"
|
||||
printf "Payload,Throughput\n" >> "$results_directory/throughput.csv"
|
||||
printf "Payload,p50,p90,p99,p100\n" >> "$results_directory/latency.csv"
|
||||
|
||||
deadlines_ms=(20 20000)
|
||||
payloads=(fib10-con fib40-con)
|
||||
durations_s=(60 70)
|
||||
|
||||
for ((i = 0; i < 2; i++)); do
|
||||
payload=${payloads[$i]}
|
||||
deadline=${deadlines_ms[$i]}
|
||||
duration=${durations_s[$i]}
|
||||
|
||||
# Get Number of Requests
|
||||
requests=$(($(wc -l < "$results_directory/$payload.csv") - 1))
|
||||
((requests == 0)) && continue
|
||||
|
||||
# Calculate Success Rate for csv
|
||||
awk -F, '
|
||||
$7 == 200 {denom++}
|
||||
$7 == 200 && ($1 * 1000) <= '"$deadline"' {ok++}
|
||||
END{printf "'"$payload"',%3.5f\n", (ok / denom * 100)}
|
||||
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
|
||||
|
||||
# Filter on 200s, convery from s to ms, and sort
|
||||
awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
|
||||
| sort -g > "$results_directory/$payload-response.csv"
|
||||
|
||||
# Get Number of 200s
|
||||
oks=$(wc -l < "$results_directory/$payload-response.csv")
|
||||
((oks == 0)) && continue # If all errors, skip line
|
||||
|
||||
# Get Latest Timestamp
|
||||
# duration=$(tail -n1 "$results_directory/$payload.csv" | cut -d, -f8)
|
||||
throughput=$(echo "$oks/$duration" | bc)
|
||||
printf "%s,%f\n" "$payload" "$throughput" >> "$results_directory/throughput.csv"
|
||||
|
||||
# Generate Latency Data for csv
|
||||
awk '
|
||||
BEGIN {
|
||||
sum = 0
|
||||
p50 = int('"$oks"' * 0.5)
|
||||
p90 = int('"$oks"' * 0.9)
|
||||
p99 = int('"$oks"' * 0.99)
|
||||
p100 = '"$oks"'
|
||||
printf "'"$payload"',"
|
||||
}
|
||||
NR==p50 {printf "%1.4f,", $0}
|
||||
NR==p90 {printf "%1.4f,", $0}
|
||||
NR==p99 {printf "%1.4f,", $0}
|
||||
NR==p100 {printf "%1.4f\n", $0}
|
||||
' < "$results_directory/$payload-response.csv" >> "$results_directory/latency.csv"
|
||||
|
||||
# Delete scratch file used for sorting/counting
|
||||
# rm -rf "$results_directory/$payload-response.csv"
|
||||
done
|
||||
|
||||
# Transform csvs to dat files for gnuplot
|
||||
for file in success latency throughput; do
|
||||
echo -n "#" > "$results_directory/$file.dat"
|
||||
tr ',' ' ' < "$results_directory/$file.csv" | column -t >> "$results_directory/$file.dat"
|
||||
done
|
||||
|
||||
# Generate gnuplots. Commented out because we don't have *.gnuplots defined
|
||||
# generate_gnuplots
|
||||
|
||||
# Cleanup, if requires
|
||||
echo "[DONE]"
|
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
project_directory=$(cd ../.. && pwd)
|
||||
binary_directory=$(cd "$project_directory"/bin && pwd)
|
||||
|
||||
export LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH"
|
||||
export PATH="$binary_directory:$PATH"
|
||||
|
||||
SLEDGE_NWORKERS=5 SLEDGE_SCHEDULER=EDF perf record -g -s sledgert "$experiment_directory/spec.json"
|
@ -1,124 +0,0 @@
|
||||
#!/bin/bash
|
||||
source ../common.sh
|
||||
|
||||
# This experiment is intended to document how the level of concurrent requests influence the latency, throughput, and success/failure rate
|
||||
# Use -d flag if running under gdb
|
||||
|
||||
timestamp=$(date +%s)
|
||||
experiment_directory=$(pwd)
|
||||
binary_directory=$(cd ../../bin && pwd)
|
||||
|
||||
schedulers=(EDF FIFO)
|
||||
for scheduler in ${schedulers[*]}; do
|
||||
|
||||
results_directory="$experiment_directory/res/$timestamp/$scheduler"
|
||||
log=log.txt
|
||||
|
||||
mkdir -p "$results_directory"
|
||||
log_environment >> "$results_directory/$log"
|
||||
|
||||
# Start the runtime
|
||||
if [ "$1" != "-d" ]; then
|
||||
SLEDGE_NWORKERS=5 SLEDGE_SCHEDULER=$scheduler PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" >> "$results_directory/$log" 2>> "$results_directory/$log" &
|
||||
sleep 1
|
||||
else
|
||||
echo "Running under gdb"
|
||||
echo "Running under gdb" >> "$results_directory/$log"
|
||||
fi
|
||||
|
||||
inputs=(40 10)
|
||||
duration_sec=15
|
||||
offset=5
|
||||
|
||||
# Execute workloads long enough for runtime to learn excepted execution time
|
||||
echo -n "Running Samples: "
|
||||
for input in ${inputs[*]}; do
|
||||
hey -z ${duration_sec}s -cpus 3 -t 0 -o csv -m GET -d "$input\n" http://localhost:$((10000 + input))
|
||||
done
|
||||
echo "[DONE]"
|
||||
sleep 5
|
||||
|
||||
echo "Running Experiments"
|
||||
# Run each separately
|
||||
hey -z ${duration_sec}s -cpus 4 -c 100 -t 0 -o csv -m GET -d "40\n" http://localhost:10040 > "$results_directory/fib40.csv"
|
||||
hey -z ${duration_sec}s -cpus 4 -c 100 -t 0 -o csv -m GET -d "10\n" http://localhost:10010 > "$results_directory/fib10.csv"
|
||||
|
||||
# Run lower priority first, then higher priority. The lower priority has offsets to ensure it runs the entire time the high priority is trying to run
|
||||
hey -z $((duration_sec + 2 * offset))s -cpus 2 -c 100 -t 0 -o csv -m GET -d "40\n" http://localhost:10040 > "$results_directory/fib40-con.csv" &
|
||||
sleep $offset
|
||||
hey -z ${duration_sec}s -cpus 2 -c 100 -t 0 -o csv -m GET -d "10\n" http://localhost:10010 > "$results_directory/fib10-con.csv" &
|
||||
sleep $((duration_sec + offset + 15))
|
||||
|
||||
# Stop the runtime if not in debug mode
|
||||
[ "$1" != "-d" ] && kill_runtime
|
||||
|
||||
# Generate *.csv and *.dat results
|
||||
echo -n "Parsing Results: "
|
||||
|
||||
printf "Payload,Success_Rate\n" >> "$results_directory/success.csv"
|
||||
printf "Payload,Throughput\n" >> "$results_directory/throughput.csv"
|
||||
printf "Payload,p50,p90,p99,p100\n" >> "$results_directory/latency.csv"
|
||||
|
||||
deadlines_ms=(2 2 3000 3000)
|
||||
payloads=(fib10 fib10-con fib40 fib40-con)
|
||||
|
||||
for ((i = 0; i < 4; i++)); do
|
||||
# for payload in ${payloads[*]}; do
|
||||
payload=${payloads[$i]}
|
||||
deadline=${deadlines_ms[$i]}
|
||||
|
||||
# Get Number of Requests
|
||||
requests=$(($(wc -l < "$results_directory/$payload.csv") - 1))
|
||||
((requests == 0)) && continue
|
||||
|
||||
# Calculate Success Rate for csv
|
||||
awk -F, '
|
||||
$7 == 200 && ($1 * 1000) <= '"$deadline"' {ok++}
|
||||
END{printf "'"$payload"',%3.5f\n", (ok / (NR - 1) * 100)}
|
||||
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
|
||||
|
||||
# Filter on 200s, convery from s to ms, and sort
|
||||
awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
|
||||
| sort -g > "$results_directory/$payload-response.csv"
|
||||
|
||||
# Get Number of 200s
|
||||
oks=$(wc -l < "$results_directory/$payload-response.csv")
|
||||
((oks == 0)) && continue # If all errors, skip line
|
||||
|
||||
# Get Latest Timestamp
|
||||
duration=$(tail -n1 "$results_directory/$payload.csv" | cut -d, -f8)
|
||||
throughput=$(echo "$oks/$duration" | bc)
|
||||
printf "%s,%f\n" "$payload" "$throughput" >> "$results_directory/throughput.csv"
|
||||
|
||||
# Generate Latency Data for csv
|
||||
awk '
|
||||
BEGIN {
|
||||
sum = 0
|
||||
p50 = int('"$oks"' * 0.5)
|
||||
p90 = int('"$oks"' * 0.9)
|
||||
p99 = int('"$oks"' * 0.99)
|
||||
p100 = '"$oks"'
|
||||
printf "'"$payload"',"
|
||||
}
|
||||
NR==p50 {printf "%1.4f%,", $0 / '"$deadline"' * 100}
|
||||
NR==p90 {printf "%1.4f%,", $0 / '"$deadline"' * 100}
|
||||
NR==p99 {printf "%1.4f%,", $0 / '"$deadline"' * 100}
|
||||
NR==p100 {printf "%1.4f%\n", $0 / '"$deadline"' * 100}
|
||||
' < "$results_directory/$payload-response.csv" >> "$results_directory/latency.csv"
|
||||
|
||||
# Delete scratch file used for sorting/counting
|
||||
# rm -rf "$results_directory/$payload-response.csv"
|
||||
done
|
||||
|
||||
# Transform csvs to dat files for gnuplot
|
||||
for file in success latency throughput; do
|
||||
echo -n "#" > "$results_directory/$file.dat"
|
||||
tr ',' ' ' < "$results_directory/$file.csv" | column -t >> "$results_directory/$file.dat"
|
||||
done
|
||||
|
||||
# Generate gnuplots. Commented out because we don't have *.gnuplots defined
|
||||
# generate_gnuplots
|
||||
|
||||
# Cleanup, if requires
|
||||
echo "[DONE]"
|
||||
done
|
@ -1,5 +0,0 @@
|
||||
|
||||
|
||||
hey -n 200 -c 200 -t 0 -m GET -d "40\n" http://localhost:10040
|
||||
|
||||
hey -n 500 -c 500 -t 0 -m GET -d "10\n" http://localhost:10010
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
binary_directory=$(cd ../../bin && pwd)
|
||||
|
||||
# Start the runtime
|
||||
|
||||
PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json"
|
Loading…
Reference in new issue