This experiment explores the baseline overheads of using WebAssembly instead of native x86 execution. We execute the PolyBench/C benchmark; a set of basic C kernels, and report the slowdown of WASM execution (using Granules) compared to native x86 execution.
First, provision the cluster. For ease of deployment, we still deploy a K8s cluster of just one node, which we will access directly.
inv cluster.provision --vm Standard_D8_v5 --nodes 1 --name ${CLUSTER_NAME}
inv cluster.credentials --name ${CLUSTER_NAME}
Deploy the native baseline:
inv polybench.native.deploy
And run it:
inv polybench.run.native
To delete the k8s
cluster run:
inv polybench.native.delete
First, deploy the K8s cluster:
cd ~/faasm
source ./bin/workon.sh
WASM_VM=wamr inv k8s.deploy --workers 1
Second, upload the WASM files:
inv polybench.wasm.upload
Third, run the experiments:
inv polybench.run.granny
To remove the cluster run:
cd ~/faasm
source ./bin/workon.sh
inv k8s.delete
To plot the results you may run:
inv polybench.plot
which will generate a .pdf
file in ./plots/polybench/slowdown.pdf
.
Lastly, clean the cluster:
inv cluster.delete --name ${CLUSTER_NAME}