PsPIN/OSMOSIS
A. Verilator environment setup
1. Set up Docker container (15 minutes)
host$ git clone git@spclgitlab.ethz.ch:mkhalilov/pspin-osmosis.git
host$ cd ./pspin-osmosis/ && git submodule update --init --recursive
host$ docker-compose -p osmosis-ae up -d
As a result container osmosis-ae
will be built and run.
2. Build cycle-accurate PsPIN/OSMOSIS simulation core inside of container (30 minutes)
Last step needs around half of an hour and 128-256 GB of RAM.
host $ docker ps # get the containerID
host $ docker exec -it <containerID> bash
osmosis-ae # cd /opt/pspin/
osmosis-ae # source ./sourceme.sh
osmosis-ae # cd ./hw/verilator_model/
osmosis-ae # VERILATOR_COMPILER_WORKERS=$(nproc) make release
B. Experiments
0. Setup simulation environment (30 seconds)
- In case you stopped the container, re-run
docker-compose
as shown in Stage A1; - (Re)-attach to the running
osmosis-ae
container by re-running commands 1 - 4 from the stage A2; -
osmosis-ae # cd /opt/pspin/examples/mt_apps/
- change to the root OSMOSIS experiments working directory; -
osmosis-ae # make SPIN_KERNEL_NAME=kernels deploy
- compile SmartNIC application kernels.
1. Run experiment (2 min -- 6 hours)
The experiment pipeline contains the following steps:
-
osmosis-ae # make SPIN_APP_NAME=<experiment_name> osmosis
- compile experiment scenario from./driver
directory, i.e., experiment binarysim_<experiment_name>
will be generated in the current directory; -
osmosis-ae # nohup bash ./scripts/run_<experiment_name>.sh $(pwd)/traces/ $(pwd)/logs/ &
- run batched simulation to perform all measurements (we controlsim_<experiment_name>
binary config through environment variables) and input traffic trace. Raw simulation logs will be stored in./logs/
directory. Pre-generated traces are stored in./traces/ directory
; -
osmosis-ae # python3 ./scripts/postprocess_<experiment_name>.py $(pwd)/logs
- post-process experiment logs to data*.csv
in./logs/
directory; -
osmosis-ae # python3 ./scripts/plot_<experiment_name>.py
- run plotting script on*.csv
data to visualize it in*.pdf
format in the./figures/
directory.
To check out the figure from the host file-system (outside of container, e.g., in PDF reader) at $host <AE-repo-root-dir>/pspin/examples/mt_apps/figures/
.
Experiment 1: HPU contention aka "Hello Fair World" (2 minutes)
The experiment demonstrates that OSMOSIS WLBVT scheduler achieves fair share of SmartNIC compute engines when compared to Round Robin.
We recommend to use this experiment to validate basic functionality of experimental pipeline (e.g., AE kick-the-tires stage).
osmosis-ae # nohup bash ./scripts/run_hpu_contention.sh $(pwd)/traces/ $(pwd)/logs/ &
osmosis-ae # python3 ./scripts/postprocess_hpu_contention.py $(pwd)/logs
osmosis-ae # python3 ./scripts/plot_hpu_contention.py
- Checkout
figures/hpu_occupation.pdf