Skip to content

Commit

Permalink
Default settings fixes and sudo for artifact evaluation
Browse files Browse the repository at this point in the history
Fixing path to start_resource_monitoring.sh

screen/tmux and create folders

Path fixes

Path fix

Signed-off-by: Lazar Cvetković <[email protected]>
  • Loading branch information
cvetkovic committed Aug 20, 2024
1 parent 99390bf commit 3878b99
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
7 changes: 4 additions & 3 deletions artifact_evaluation/azure_500/dirigent/INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ Description: This experiment runs the downsampled Azure trace with 500 functions
Instructions:
- Start Dirigent cluster as per instructions located in the root folder of artifact evaluation instructions.
- On the `node0` execute `mkdir -p ~/invitro/data/traces/azure_500` or `mkdir -p ~/invitro/data/traces/azure_500_firecracker`, depending on which runtime you use.
- Copy traces to `node0` using `scp azure_500/* user@node0:~/invitro/data/traces/azure_500/` or `scp azure_500_firecracker/* user@node0:~/invitro/data/traces/azure_500_firecracker/`.
- Make sure on `node0` `~/invitro` branch is `rps_mode`. With text editor open `cmd/config_dirigent_trace.json` and change TracePath to match `azure_500` or `azure_500_firecracker`.
- Copy traces from this folder to `node0` using `scp azure_500/* user@node0:~/invitro/data/traces/azure_500/` or `scp azure_500_firecracker/* user@node0:~/invitro/data/traces/azure_500_firecracker/`.
- Make sure on `node0` `~/invitro` branch is `rps_mode`. With text editor open `~/invitro/cmd/config_dirigent_trace.json` and change TracePath to match `azure_500` or `azure_500_firecracker`.
- On your local machine run `./scripts/start_resource_monitoring.sh user@node0 user@node1 user@node2`.
- Run the load generator in `screen` on `node0` with `cd ~/invitro; go run cmd/loader.go --config cmd/config_dirigent_trace.json`. Wait until the experiment completed (~30 minutes). There should be ~170K invocations, with a negligible failure rate.
- Run the load generator in screen/tmux on `node0` with `cd ~/invitro; go run cmd/loader.go --config cmd/config_dirigent_trace.json`. Wait until the experiment completed (~30 minutes). There should be ~170K invocations, with a negligible failure rate.
- Gather experiment results. Make sure you do not overwrite data from the other experiment, and you place results in correct folders.
- Create folders for storing results with `mkdir -p ./artifact_evaluation/azure_500/dirigent/results_azure_500` and `mkdir -p ./artifact_evaluation/azure_500/dirigent/results_azure_500_firecracker`
- Copy load generator output with `scp user@node0:~/invitro/data/out/experiment_duration_30.csv results_azure_500/`
- Copy resource utilization data with `mkdir -p ./artifact_evaluation/azure_500/dirigent/results_azure_500/cpu_mem_usage && ./scripts/collect_resource_monitoring.sh ./artifact_evaluation/azure_500/dirigent/results_azure_500/cpu_mem_usage user@node0 user@node1 user@node2`.
3 changes: 2 additions & 1 deletion artifact_evaluation/azure_500/knative/INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Instructions:
- On `node0` create a directory where trace will be stored `cd invitro; mkdir data/traces/azure_500`.
- Copy the trace from folder where this instruction file is located to the folder you previously created on `node0` using the following command `scp azure_500/*.csv user@node0:~/invitro/data/traces/azure_500`.
- On your local machine run `./scripts/start_resource_monitoring.sh user@node0 user@node1 user@node2`.
- On `node0` run `screen` and inside the `screen` run `go run cmd/loader.go --config cmd/config_knative.json`. Function deployment will take 10-20 minutes, and then experiment will run for additional 30 minutes.
- On `node0` inside screen/tmux run `cd ~/invitro; go run cmd/loader.go --config cmd/config_knative.json`. Function deployment will take 10-20 minutes, and then experiment will run for additional 30 minutes.
- Gather experiment results. Make sure you do not overwrite data from the other experiment, and you place results in correct folders.
- Create a folder for storing results with `mkdir -p ./artifact_evaluation/azure_500/knative/results_azure_500`
- Copy load generator output with `scp user@node0:~/invitro/data/out/experiment_duration_30.csv results_azure_500/`
- Copy resource utilization data with `mkdir -p ./artifact_evaluation/azure_500/knative/results_azure_500/cpu_mem_usage && ./scripts/collect_resource_monitoring.sh ./artifact_evaluation/azure_500/knative/results_azure_500/cpu_mem_usage user@node0 user@node1 user@node2`.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Instructions:
- Open `~/invitro/workloads/container/trace_func_go.yaml`, set `autoscaling.knative.dev/max-scale` to `1`, and then set image to `docker.io/cvetkovic/dirigent_empty_function:latest`.
- Run `kubectl patch configmap config-autoscaler -n knative-serving -p '{"data":{"scale-to-zero-grace-period":"1s","scale-to-zero-pod-retention-period":"1s","stable-window":"6s"}}'`
- In `~/invitro/cmd/config_knative_rps.json` set `ExperimentDuration` to 2 and `RpsColdStartRatioPercentage` to `100`
- The command for running experiment for each data point is `cd invitro; go run cmd/loader.go --config cmd/config_knative_rps.json`. Use the following data point settings in `cmd/config_knative_rps.json` for experiments.
- The command for running experiment for each data point is `cd ~/invitro; go run cmd/loader.go --config cmd/config_knative_rps.json`. Use the following data point settings in `cmd/config_knative_rps.json` for experiments.
- `RpsTarget=1` with `RpsCooldownSeconds=10`
- `RpsTarget=2` with `RpsCooldownSeconds=15`
- `RpsTarget=3` with `RpsCooldownSeconds=20`
Expand Down
4 changes: 2 additions & 2 deletions scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function RemoteExec() {

function SetupControlPlane() {
# Start Redis server
RemoteExec $1 "sudo docker stop \$(docker ps -aq)"
RemoteExec $1 "sudo docker rm \$(docker ps -a -q)"
RemoteExec $1 "sudo docker stop \$(sudo docker ps -aq)"
RemoteExec $1 "sudo docker rm \$(sudo docker ps -a -q)"
RemoteExec $1 "sudo docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest"

RemoteExec $1 "cd ~/cluster_manager; git pull"
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FAKE_WORKER_MODE=0
DAEMONS_PER_NODE=1

# Choose from [containerd, firecracker]
WORKER_RUNTIME="firecracker"
WORKER_RUNTIME="containerd"
4 changes: 3 additions & 1 deletion scripts/start_resource_monitoring.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash

readonly DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"

function internal() {
# Connect to the remote machine and start a tmux session
scp /home/lcvetkovic/projects/cluster_manager/cmd/monitoring/monitoring.py $1:~/monitoring.py
scp $DIR/../cmd/monitoring/monitoring.py $1:~/monitoring.py

ssh $1 "tmux kill-session -t resource_monitoring"
ssh $1 "tmux new-session -d -s resource_monitoring"
Expand Down

0 comments on commit 3878b99

Please sign in to comment.