Enhanced Bash scripts (#384)
* bash enhancements added depth_to_xyz experiment * bash enhancements added depth_to_xyz experiment * updated awsm repo * remove mtdbf env file for nowmaster
parent
de22264f4d
commit
4ae8b02413
@ -1,24 +1,23 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"includePath": [
|
||||
"/usr/include/",
|
||||
"${workspaceFolder}/runtime/include/",
|
||||
"${workspaceFolder}/runtime/thirdparty/ck/include/",
|
||||
"${workspaceFolder}/runtime/thirdparty/http-parser/",
|
||||
"${workspaceFolder}/runtime/thirdparty/jsmn/",
|
||||
"${workspaceFolder}/awsm/runtime/libc/wasi/include/",
|
||||
"${workspaceFolder}/libsledge/include"
|
||||
],
|
||||
"defines": [
|
||||
"x86_64",
|
||||
"_GNU_SOURCE"
|
||||
],
|
||||
"cStandard": "c17",
|
||||
"compilerPath": "/usr/bin/clang"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"includePath": [
|
||||
"/usr/include/",
|
||||
"${workspaceFolder}/runtime/include/",
|
||||
"${workspaceFolder}/runtime/thirdparty/ck/include/",
|
||||
"${workspaceFolder}/runtime/thirdparty/http-parser/",
|
||||
"${workspaceFolder}/runtime/thirdparty/jsmn/",
|
||||
"${workspaceFolder}/awsm/runtime/libc/wasi/include/",
|
||||
"${workspaceFolder}/libsledge/include"
|
||||
],
|
||||
"defines": [
|
||||
"x86_64",
|
||||
"_GNU_SOURCE"
|
||||
],
|
||||
"cStandard": "c17"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
@ -1 +1 @@
|
||||
Subproject commit f0b35e756395f79b06be8dd2660eecac94506e94
|
||||
Subproject commit e2ba697861201f2aaca37460842ab5c34c8d1716
|
@ -0,0 +1,113 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! command -v http > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y httpie
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y httpie
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v hey > /dev/null; then
|
||||
HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64
|
||||
wget $HEY_URL -O hey
|
||||
chmod +x hey
|
||||
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
mv hey /usr/bin/hey
|
||||
else
|
||||
sudo mv hey /usr/bin/hey
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v loadtest > /dev/null; then
|
||||
if ! command -v npm > /dev/null; then
|
||||
# if [[ $(whoami) == "root" ]]; then
|
||||
# apt update
|
||||
# apt install -y npm
|
||||
# else
|
||||
# sudo apt update
|
||||
# sudo apt install -y npm
|
||||
# fi
|
||||
# installs NVM (Node Version Manager)
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
# download and install Node.js
|
||||
nvm install 14
|
||||
# verifies the right Node.js version is in the environment
|
||||
node -v # should print `v14.21.3`
|
||||
# verifies the right NPM version is in the environment
|
||||
npm -v # should print `6.14.18`
|
||||
fi
|
||||
|
||||
# Try pulling Emil's version of loadtest to support post binary files
|
||||
# if [[ $(whoami) == "root" ]]; then
|
||||
# npm install -y -g loadtest
|
||||
# else
|
||||
# sudo npm install -y -g loadtest
|
||||
# fi
|
||||
|
||||
pushd ~
|
||||
git clone https://github.com/emil916/loadtest.git
|
||||
pushd loadtest
|
||||
# if [[ $(whoami) == "root" ]]; then
|
||||
npm install -g
|
||||
# else
|
||||
# sudo npm install -g
|
||||
# fi
|
||||
popd
|
||||
popd
|
||||
fi
|
||||
|
||||
if ! command -v gnuplot > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y gnuplot
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y gnuplot
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if ! command -v jq > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y jq
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y jq
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v htop > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y htop
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y htop
|
||||
fi
|
||||
fi
|
||||
|
||||
# For SOD:
|
||||
# if ! command -v imagemagick > /dev/null; then
|
||||
# if [ "$(whoami)" == "root" ]; then
|
||||
# apt-get install -y imagemagick
|
||||
# else
|
||||
# sudo apt-get install -y imagemagick
|
||||
# fi
|
||||
# fi
|
||||
|
||||
# For GOCR, too many to check one-by-one, so uncomment below to install:
|
||||
# if [[ "$(whoami)" == "root" ]]; then
|
||||
# apt-get install -y netpbm pango1.0-tools wamerican fonts-roboto fonts-cascadia-code fonts-dejavu
|
||||
# else
|
||||
# sudo apt-get install -y netpbm pango1.0-tools wamerican fonts-roboto fonts-cascadia-code fonts-dejavu
|
||||
# fi
|
||||
|
||||
source ~/.bashrc
|
@ -1,74 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! command -v http > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y httpie
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y httpie
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v hey > /dev/null; then
|
||||
HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64
|
||||
wget $HEY_URL -O hey
|
||||
chmod +x hey
|
||||
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
mv hey /usr/bin/hey
|
||||
else
|
||||
sudo mv hey /usr/bin/hey
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v loadtest > /dev/null; then
|
||||
if ! command -v npm > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y npm
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y npm
|
||||
fi
|
||||
fi
|
||||
|
||||
# Try pulling Emil's version of loadtest to support post binary files
|
||||
# if [[ $(whoami) == "root" ]]; then
|
||||
# npm install -y -g loadtest
|
||||
# else
|
||||
# sudo npm install -y -g loadtest
|
||||
# fi
|
||||
|
||||
pushd ~
|
||||
git clone https://github.com/emil916/loadtest.git
|
||||
pushd loadtest
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
npm install -g
|
||||
else
|
||||
sudo npm install -g
|
||||
fi
|
||||
popd
|
||||
popd
|
||||
fi
|
||||
|
||||
if ! command -v gnuplot > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y gnuplot
|
||||
else
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gnuplot
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if ! command -v jq > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y jq
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y jq
|
||||
fi
|
||||
fi
|
@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! command -v gnuplot > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y gnuplot
|
||||
else
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gnuplot
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if ! command -v jq > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y jq
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y jq
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v htop > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y htop
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y htop
|
||||
fi
|
||||
fi
|
||||
|
||||
# For SOD:
|
||||
# if ! command -v imagemagick > /dev/null; then
|
||||
# if [ "$(whoami)" == "root" ]; then
|
||||
# apt-get install -y imagemagick
|
||||
# else
|
||||
# sudo apt-get install -y imagemagick
|
||||
# fi
|
||||
# fi
|
||||
|
||||
# For GOCR, too many to check one-by-one, so uncomment below to install:
|
||||
# if [[ "$(whoami)" == "root" ]]; then
|
||||
# apt-get install -y netpbm pango1.0-tools wamerican fonts-roboto fonts-cascadia-code fonts-dejavu
|
||||
# else
|
||||
# sudo apt-get install -y netpbm pango1.0-tools wamerican fonts-roboto fonts-cascadia-code fonts-dejavu
|
||||
# fi
|
@ -1,84 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! command -v http > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y httpie
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y httpie
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v hey > /dev/null; then
|
||||
HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64
|
||||
wget $HEY_URL -O hey
|
||||
chmod +x hey
|
||||
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
mv hey /usr/bin/hey
|
||||
else
|
||||
sudo mv hey /usr/bin/hey
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v loadtest > /dev/null; then
|
||||
if ! command -v npm > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y npm
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y npm
|
||||
fi
|
||||
fi
|
||||
|
||||
# Try pulling Emil's version of loadtest to support post binary files
|
||||
# if [[ $(whoami) == "root" ]]; then
|
||||
# npm install -y -g loadtest
|
||||
# else
|
||||
# sudo npm install -y -g loadtest
|
||||
# fi
|
||||
|
||||
pushd ~
|
||||
git clone https://github.com/emil916/loadtest.git
|
||||
pushd loadtest
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
npm install -g
|
||||
else
|
||||
sudo npm install -g
|
||||
fi
|
||||
popd
|
||||
popd
|
||||
fi
|
||||
|
||||
if ! command -v gnuplot > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y gnuplot
|
||||
else
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gnuplot
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if ! command -v jq > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y jq
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y jq
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v htop > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y htop
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y htop
|
||||
fi
|
||||
fi
|
@ -0,0 +1,126 @@
|
||||
# shellcheck shell=bash
|
||||
# shellcheck disable=SC2034,SC2153,SC2154,SC2155
|
||||
if [ -n "$__run_init_sh__" ]; then return; fi
|
||||
__run_init_sh__=$(date)
|
||||
|
||||
# Globals to fill during run_init in run.sh, to use in base and generate_spec
|
||||
declare -A ports=()
|
||||
declare -A repl_periods=()
|
||||
declare -A max_budgets=()
|
||||
declare -A reservations=()
|
||||
declare -A wasm_paths=()
|
||||
declare -A expected_execs=()
|
||||
declare -A deadlines=()
|
||||
declare -A resp_content_types=()
|
||||
declare -A arg_opts_hey=()
|
||||
declare -A arg_opts_lt=()
|
||||
declare -A args=()
|
||||
declare -A loads=()
|
||||
declare -a workloads=()
|
||||
declare -A workload_tids=()
|
||||
declare -A workload_deadlines=()
|
||||
declare -A workload_vars=()
|
||||
|
||||
assert_run_experiments_args() {
|
||||
if (($# != 3)); then
|
||||
panic "invalid number of arguments \"$#\""
|
||||
return 1
|
||||
elif [[ -z "$1" ]]; then
|
||||
panic "hostname \"$1\" was empty"
|
||||
return 1
|
||||
elif [[ ! -d "$2" ]]; then
|
||||
panic "directory \"$2\" does not exist"
|
||||
return 1
|
||||
elif [[ -z "$3" ]]; then
|
||||
panic "load gen \"$3\" was empty"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_process_client_results_args() {
|
||||
if (($# != 1)); then
|
||||
error_msg "invalid number of arguments ($#, expected 1)"
|
||||
return 1
|
||||
elif ! [[ -d "$1" ]]; then
|
||||
error_msg "directory $1 does not exist"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_process_server_results_args() {
|
||||
if (($# != 1)); then
|
||||
panic "invalid number of arguments \"$#\""
|
||||
return 1
|
||||
elif [[ ! -d "$1" ]]; then
|
||||
panic "directory \"$1\" does not exist"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
load_value() {
|
||||
local result=$1
|
||||
if [ "$result" = "?" ]; then
|
||||
result=$2
|
||||
fi
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
run_init() {
|
||||
for var in "${VARYING[@]}"; do
|
||||
for t_idx in "${!TENANT_IDS[@]}"; do
|
||||
local tenant_id=${TENANT_IDS[$t_idx]}
|
||||
local tenant=$(printf "%s-%03d" "$tenant_id" "$var")
|
||||
local port=$((INIT_PORTS[t_idx]+var))
|
||||
[ "$NUCLIO_MODE_ENABLED" == true ] && port=${INIT_PORTS[t_idx]}
|
||||
local repl_period=$(load_value "${MTDS_REPL_PERIODS_us[$t_idx]}" "$var")
|
||||
local budget=$(load_value "${MTDS_MAX_BUDGETS_us[$t_idx]}" "$var")
|
||||
local reservation=$(load_value "${MTDBF_RESERVATIONS_p[$t_idx]}" "$var")
|
||||
|
||||
ports+=([$tenant]=$port)
|
||||
repl_periods+=([$tenant]=$repl_period)
|
||||
max_budgets+=([$tenant]=$budget)
|
||||
reservations+=([$tenant]=$reservation)
|
||||
|
||||
local t_routes r_expected_execs r_deadlines r_arg_opts_hey r_arg_opts_lt r_args r_loads
|
||||
|
||||
IFS=' ' read -r -a t_routes <<< "${ROUTES[$t_idx]}"
|
||||
IFS=' ' read -r -a r_wasm_paths <<< "${WASM_PATHS[$t_idx]}"
|
||||
IFS=' ' read -r -a r_expected_execs <<< "${EXPECTED_EXEC_TIMES_us[$t_idx]}"
|
||||
IFS=' ' read -r -a r_dl_to_exec_ratios <<< "${DEADLINE_TO_EXEC_RATIOs[$t_idx]}"
|
||||
IFS=' ' read -r -a r_resp_content_types <<< "${RESP_CONTENT_TYPES[$t_idx]}"
|
||||
|
||||
IFS=' ' read -r -a r_arg_opts_hey <<< "${ARG_OPTS_HEY[$t_idx]}"
|
||||
IFS=' ' read -r -a r_arg_opts_lt <<< "${ARG_OPTS_LT[$t_idx]}"
|
||||
IFS=' ' read -r -a r_args <<< "${ARGS[$t_idx]}"
|
||||
IFS=' ' read -r -a r_loads <<< "${LOADS[$t_idx]}"
|
||||
|
||||
for r_idx in "${!t_routes[@]}"; do
|
||||
local route=${t_routes[$r_idx]}
|
||||
local wasm_path=${r_wasm_paths[$r_idx]}
|
||||
local expected=$(load_value "${r_expected_execs[$r_idx]}" "$var")
|
||||
# local deadline=${r_deadlines[$r_idx]}
|
||||
local dl_to_exec_ratio=${r_dl_to_exec_ratios[$r_idx]}
|
||||
local deadline=$((expected*dl_to_exec_ratio/100))
|
||||
local resp_content_type=${r_resp_content_types[$r_idx]}
|
||||
local arg_opt_hey=${r_arg_opts_hey[$r_idx]}
|
||||
local arg_opt_lt=${r_arg_opts_lt[$r_idx]}
|
||||
local arg=$(load_value "${r_args[$r_idx]}" "$var")
|
||||
local load=$(load_value "${r_loads[$r_idx]}" "$var")
|
||||
local workload="$tenant-$route"
|
||||
|
||||
wasm_paths+=([$workload]=$wasm_path)
|
||||
expected_execs+=([$workload]=$expected)
|
||||
deadlines+=([$workload]=$deadline)
|
||||
resp_content_types+=([$workload]=$resp_content_type)
|
||||
arg_opts_hey+=([$workload]=$arg_opt_hey)
|
||||
arg_opts_lt+=([$workload]=$arg_opt_lt)
|
||||
args+=([$workload]=$arg)
|
||||
loads+=([$workload]=$load)
|
||||
workloads+=("$workload")
|
||||
workload_tids+=([$workload]=$tenant_id)
|
||||
workload_deadlines+=([$workload]=$deadline)
|
||||
workload_vars+=([$workload]=$var)
|
||||
done
|
||||
done
|
||||
done
|
||||
}
|
@ -0,0 +1 @@
|
||||
out.png
|
After Width: | Height: | Size: 606 KiB |
After Width: | Height: | Size: 2.9 MiB |
@ -0,0 +1,32 @@
|
||||
SLEDGE_BINARY_DIR=../../runtime/bin
|
||||
HOSTNAME=localhost
|
||||
PORT=10000
|
||||
HEY_OPTS=-disable-compression -disable-keepalive -disable-redirects
|
||||
|
||||
default: run
|
||||
|
||||
clean:
|
||||
rm -rf res/*
|
||||
|
||||
run:
|
||||
SLEDGE_SCHEDULER=MTDBF LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} ${SLEDGE_BINARY_DIR}/sledgert spec.json
|
||||
|
||||
debug:
|
||||
SLEDGE_SCHEDULER=MTDBF LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert \
|
||||
--eval-command="handle SIGUSR1 noprint nostop" \
|
||||
--eval-command="handle SIGPIPE noprint nostop" \
|
||||
--eval-command="set pagination off" \
|
||||
--eval-command="set print pretty" \
|
||||
--eval-command="run spec.json"
|
||||
|
||||
valgrind:
|
||||
SLEDGE_DISABLE_PREEMPTION=true SLEDGE_NWORKERS=1 LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} valgrind --leak-check=full --max-stackframe=11150456 --run-libc-freeres=no --run-cxx-freeres=no ${SLEDGE_BINARY_DIR}/sledgert spec.json
|
||||
|
||||
client:
|
||||
curl -H 'Expect:' -H "Content-Type: image/png" --data-binary "@./0_depth.png" --output "out.png" "${HOSTNAME}:${PORT}/depth_to_xyz"
|
||||
|
||||
client-hey:
|
||||
hey ${HEY_OPTS} -n 90 -c 90 -t 0 -m POST -D "./0_depth.png" "http://${HOSTNAME}:${PORT}/depth_to_xyz"
|
||||
|
||||
client-loadtest:
|
||||
loadtest -n 90 -c 90 -T "image/png" -m POST -b "./0_depth.png" "http://${HOSTNAME}:${PORT}/depth_to_xyz"
|
After Width: | Height: | Size: 1.5 MiB |
@ -0,0 +1,78 @@
|
||||
reset
|
||||
|
||||
set term jpeg size 1000,500
|
||||
set output "latency.jpg"
|
||||
|
||||
#set xlabel "Reservation Utilization %"
|
||||
#set ylabel "Latency (us)"
|
||||
|
||||
set key left top
|
||||
|
||||
set xrange [-5:]
|
||||
set yrange [0:]
|
||||
|
||||
set style histogram columnstacked
|
||||
set key horizontal
|
||||
|
||||
set macros
|
||||
# Placement of the a,b,c,d labels in the graphs
|
||||
POS = "at graph 0.05,1.03 font ',10'"
|
||||
|
||||
# x- and ytics for each row resp. column
|
||||
NOXTICS = "unset xlabel"
|
||||
XTICS = "set xlabel 'Reservation Utilization %'"
|
||||
NOYTICS = "unset ylabel"
|
||||
YTICS = "set ylabel 'Latency (us)'"
|
||||
|
||||
# Margins for each row resp. column
|
||||
TMARGIN = "set tmargin at screen 0.90; set bmargin at screen 0.55"
|
||||
BMARGIN = "set tmargin at screen 0.55; set bmargin at screen 0.20"
|
||||
LMARGIN = "set lmargin at screen 0.15; set rmargin at screen 0.55"
|
||||
RMARGIN = "set lmargin at screen 0.55; set rmargin at screen 0.95"
|
||||
|
||||
# plot \
|
||||
# for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:7 title 'Tenant '.t_id.' p99' w lp, \
|
||||
# for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:6 title 'Tenant '.t_id.' p90' w lp, \
|
||||
# for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:5 title 'Tenant '.t_id.' p50' w lp, \
|
||||
# for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:4 title 'Tenant '.t_id.' mean' w lp, \
|
||||
# for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:3 title 'Tenant '.t_id.' min' w lp
|
||||
|
||||
### Start multiplot (2x2 layout)
|
||||
set multiplot layout 2,2 rowsfirst
|
||||
# --- GRAPH a
|
||||
set label 1 'p99' @POS
|
||||
@NOXTICS; @YTICS
|
||||
#@TMARGIN; @LMARGIN
|
||||
plot for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:7 title 'Tenant '.t_id w lp
|
||||
# --- GRAPH b
|
||||
set label 1 'p90' @POS
|
||||
@NOXTICS; @NOYTICS
|
||||
#@TMARGIN; @RMARGIN
|
||||
plot for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:6 notitle w lp
|
||||
# --- GRAPH c
|
||||
set label 1 'p50' @POS
|
||||
@XTICS; @YTICS
|
||||
#@BMARGIN; @LMARGIN
|
||||
plot for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:5 notitle w lp
|
||||
# --- GRAPH d
|
||||
set label 1 'mean' @POS
|
||||
@XTICS; @NOYTICS
|
||||
#@BMARGIN; @RMARGIN
|
||||
plot for [t_id in tenant_ids] 'latency_'.t_id.'.dat' using 1:4 notitle w lp
|
||||
unset multiplot
|
||||
### End multiplot
|
||||
|
||||
# plot \
|
||||
# 'latency_A.dat' using 1:7 title 'A p99' lt 1 lc 1 w lp, \
|
||||
# 'latency_A.dat' using 1:6 title 'A p90' lt 2 lc 1 w lp, \
|
||||
# 'latency_A.dat' using 1:5 title 'A p50' lt 3 lc 1 w lp, \
|
||||
# 'latency_A.dat' using 1:4 title 'A mean' lt 4 lc 1 w lp, \
|
||||
# 'latency_A.dat' using 1:3 title 'A min' lt 5 lc 1 w lp,\
|
||||
# 'latency_B.dat' using 1:7 title 'B p99' lt 1 lc 2 w lp, \
|
||||
# 'latency_B.dat' using 1:6 title 'B p90' lt 2 lc 2 w lp, \
|
||||
# 'latency_B.dat' using 1:5 title 'B p50' lt 3 lc 2 w lp, \
|
||||
# 'latency_B.dat' using 1:4 title 'B mean' lt 4 lc 2 w lp, \
|
||||
# 'latency_B.dat' using 1:3 title 'B min' lt 5 lc 2 w lp
|
||||
|
||||
# 'latency_A.dat' using 1:8 title 'A p100' linetype 0 linecolor 1 with linespoints, \
|
||||
# 'latency_B.dat' using 1:8 title 'B p100' linetype 0 linecolor 2 with linespoints, \
|
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
SLEDGE_CMUSOD_DIR="/users/emil/sledge-server/tests/cmu-sod"
|
||||
# SLEDGE_CMUSOD_DIR="/home/gwu/sledge/tests/cmu-sod"
|
||||
|
||||
pidof sledgert >/dev/null
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
now=$(date)
|
||||
echo "" >> $SLEDGE_CMUSOD_DIR/server_log.txt
|
||||
echo "Restarting Sledge: $now" >> $SLEDGE_CMUSOD_DIR/server_log.txt
|
||||
make -C $SLEDGE_CMUSOD_DIR run &>> $SLEDGE_CMUSOD_DIR/server_log.txt &
|
||||
fi
|
@ -0,0 +1,17 @@
|
||||
Enter this command and copy & paste the following two lines:
|
||||
|
||||
crontab -e
|
||||
|
||||
* * * * * /users/emil/sledge-server/tests/cmu-sod/auto_start.sh
|
||||
* * * * * ( sleep 30 ; /users/emil/sledge-server/tests/cmu-sod/auto_start.sh )
|
||||
|
||||
|
||||
To stop:
|
||||
sudo service cron stop
|
||||
|
||||
To start:
|
||||
sudo service cron start
|
||||
|
||||
To remove type:
|
||||
crontab -e
|
||||
and then remove the above two lines.
|
@ -0,0 +1 @@
|
||||
30
|
@ -0,0 +1,19 @@
|
||||
import time
|
||||
import requests
|
||||
|
||||
url = 'http://URL:10000/depth_to_xyz'
|
||||
|
||||
img = None
|
||||
|
||||
payload = open('0_depth.png', 'rb')
|
||||
response = requests.post(url, data=payload)
|
||||
img = response.content
|
||||
print("single request works!")
|
||||
# time.sleep(1)
|
||||
|
||||
for i in range(100):
|
||||
payload = open('0_depth.png', 'rb')
|
||||
response = requests.post(url, data=payload)
|
||||
img = response.content
|
||||
# time.sleep(1)
|
||||
print(f"multi request #{i} works!")
|
@ -0,0 +1,11 @@
|
||||
import time
|
||||
import requests
|
||||
|
||||
url = 'http://URL:10000/depth_to_xyz'
|
||||
|
||||
img = None
|
||||
|
||||
payload = open('0_depth.png', 'rb')
|
||||
response = requests.post(url, data=payload)
|
||||
img = response.content
|
||||
|
@ -0,0 +1,31 @@
|
||||
# import numpy as np
|
||||
import requests
|
||||
import threading
|
||||
import time
|
||||
|
||||
from flask import Flask, Response
|
||||
|
||||
url = 'http://URL:10000/depth_to_xyz'
|
||||
|
||||
# app = Flask(__name__)
|
||||
|
||||
img = None
|
||||
|
||||
def get_img():
|
||||
global img
|
||||
while True:
|
||||
print("start")
|
||||
try:
|
||||
payload = open('0_depth.png', 'rb')
|
||||
response = requests.post(url, data=payload)
|
||||
img = response.content
|
||||
print("got img")
|
||||
time.sleep(0.01)
|
||||
except:
|
||||
print("failed")
|
||||
time.sleep(5)
|
||||
|
||||
thread = threading.Thread(target=get_img)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
thread.join()
|
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC1091,SC2034,SC2155
|
||||
source ../bash_libraries/multi_tenancy_base.sh || exit 1
|
||||
|
||||
# Configure SERVER parameters: (this is to skip the .env config file)
|
||||
export SLEDGE_SCHEDULER=MTDBF
|
||||
export SLEDGE_DISABLE_PREEMPTION=false
|
||||
export SLEDGE_SANDBOX_PERF_LOG=perf.log
|
||||
export SLEDGE_HTTP_SESSION_PERF_LOG=http_perf.log
|
||||
# export SLEDGE_NWORKERS=1
|
||||
# export SLEDGE_PROC_MHZ=2100
|
||||
# export EXTRA_EXEC_PERCENTILE=10
|
||||
|
||||
# The global configs for the scripts
|
||||
declare -r CLIENT_TERMINATE_SERVER=false
|
||||
declare -r DURATION_sec=30
|
||||
declare -r ESTIMATIONS_PERCENTILE=60
|
||||
declare -r NWORKERS=${SLEDGE_NWORKERS:-1}
|
||||
|
||||
# Tenant configs:
|
||||
declare -ar TENANT_IDS=("cmu")
|
||||
declare -ar INIT_PORTS=(10000)
|
||||
declare -ar ROUTES=("depth_to_xyz")
|
||||
declare -ar MTDS_REPL_PERIODS_us=(0)
|
||||
declare -ar MTDS_MAX_BUDGETS_us=(0)
|
||||
declare -ar MTDBF_RESERVATIONS_p=(0)
|
||||
|
||||
# Per route configs:
|
||||
declare -ar WASM_PATHS=("depth_to_xyz.wasm.so")
|
||||
declare -ar RESP_CONTENT_TYPES=("image/png")
|
||||
declare -ar EXPECTED_EXEC_TIMES_us=("950000")
|
||||
declare -ir DEADLINE_TO_EXEC_RATIO=500 # percentage
|
||||
|
||||
# For HEY -d is text, -D is file input. For LoadTest -P is text, -b is file input.
|
||||
declare -ar ARG_OPTS_HEY=("-D")
|
||||
declare -ar ARG_OPTS_LT=("-b")
|
||||
declare -ar ARGS=("./0_depth.png")
|
||||
|
||||
# 100=FULL load, 50=HALF load ...
|
||||
declare -ar LOADS=("100")
|
||||
|
||||
# When trying varying values, you must set ONE value from the above params to ? (question mark)
|
||||
# For example, for varying the loads, try: LOADS=("50 ?" "100")
|
||||
# declare -ar VARYING=(0) # no variation, single experiment
|
||||
declare -ar VARYING=(0)
|
||||
|
||||
run_init
|
||||
generate_spec_json
|
||||
framework_init "$@"
|
@ -0,0 +1,44 @@
|
||||
[
|
||||
{
|
||||
"name": "Admin",
|
||||
"port": 55555,
|
||||
"replenishment-period-us": 0,
|
||||
"max-budget-us": 0,
|
||||
"reservation-percentile": 0,
|
||||
"routes": [
|
||||
{
|
||||
"route": "/admin",
|
||||
"path": "fibonacci.wasm.so",
|
||||
"admissions-percentile": 50,
|
||||
"expected-execution-us": 1000,
|
||||
"relative-deadline-us": 10000,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"route": "/terminator",
|
||||
"path": "fibonacci.wasm.so",
|
||||
"admissions-percentile": 50,
|
||||
"expected-execution-us": 1000,
|
||||
"relative-deadline-us": 10000,
|
||||
"http-resp-content-type": "text/plain"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "cmu-000",
|
||||
"port": 10000,
|
||||
"replenishment-period-us": 0,
|
||||
"max-budget-us": 0,
|
||||
"reservation-percentile": 0,
|
||||
"routes": [
|
||||
{
|
||||
"route": "/depth_to_xyz",
|
||||
"path": "depth_to_xyz.wasm.so",
|
||||
"admissions-percentile": 60,
|
||||
"expected-execution-us": 950000,
|
||||
"relative-deadline-us": 4750000,
|
||||
"http-resp-content-type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -0,0 +1,16 @@
|
||||
reset
|
||||
|
||||
set term jpeg
|
||||
set output "success.jpg"
|
||||
|
||||
#set xlabel "Reservation Utilization %"
|
||||
set xlabel "Extra exececution slack %"
|
||||
set ylabel "Deadline success rate %"
|
||||
|
||||
set xrange [-5:]
|
||||
set yrange [0:110]
|
||||
|
||||
plot for [t_id in tenant_ids] 'success_'.t_id.'.dat' using 1:2 title t_id w lp
|
||||
|
||||
#plot 'success_A.dat' using 1:2 title 'Tenant A success rate' linetype 1 linecolor 1 with linespoints,\
|
||||
# 'success_B.dat' using 1:2 title 'Tenant B success rate' lt 2 lc 2 w lp
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "tenant",
|
||||
"port": 0,
|
||||
"replenishment-period-us": 0,
|
||||
"max-budget-us": 0,
|
||||
"reservation-percentile": 0,
|
||||
"routes": [
|
||||
{
|
||||
"route": "/route",
|
||||
"path": "fibonacci.wasm.so",
|
||||
"admissions-percentile": 0,
|
||||
"expected-execution-us": 0,
|
||||
"relative-deadline-us": 0,
|
||||
"http-resp-content-type": "text/plain"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
reset
|
||||
|
||||
set term jpeg
|
||||
set output "throughput.jpg"
|
||||
|
||||
set xlabel "Reservation Utilization %"
|
||||
set ylabel "Requests/sec"
|
||||
|
||||
set xrange [-5:]
|
||||
set yrange [0:]
|
||||
|
||||
plot for [t_id in tenant_ids] 'throughput_'.t_id.'.dat' using 1:2 title 'Tenant '.t_id w lp
|
||||
|
||||
#plot 'throughput_A.dat' using 1:2 title 'Tenant A Throughput' linetype 1 linecolor 1 with linespoints,\
|
||||
# 'throughput_B.dat' using 1:2 title 'Tenant B Throughput' linetype 2 linecolor 2 with linespoints
|
Loading…
Reference in new issue