This repository is an artifact for the paper: MXFaaS: Resource Sharing in Serverless Environments for Parallelism and Efficiency [PDF] by Jovan Stojkovic (UIUC), Tianyin Xu (UIUC), Hubertus Franke (IBM Research), and Josep Torrellas (UIUC). The paper is published at International Symposium on Computer Architecture (ISCA), June 2023.
MXFaaS is a novel serverless platform designed for high-efficiency. MXFaaS improves function performance by efficiently multiplexing processor cycles, I/O bandwidth, and memory/processor state between concurrently-executing instances of the same function. MXFaaS introduces the new MXContainer abstraction, which can con- currently execute multiple invocations of the same function and owns a set of cores. To enable efficient use of processor cycles, the MXContainer carefully helps schedule same-function invocations for minimal response time. To enable efficient use of I/O band- width, the MXContainer coalesces remote storage accesses and remote function calls from same-function invocations. Finally, to enable efficient use of memory/processor state, the MXContainer first initializes function state and only later, on demand, spawns a process per function invocation, so that all invocations share unmodified memory state and minimize memory footprint
This repository includes the prototype implementation of MXContainers, integration of MXFaaS with KNative, the scripts to perform the characterization study on the open-source production-level traces and serverless benchmarks, and the experiment workflow to run these workloads
Our artifact includes the prototype implementation of MXContainers, integration of MXFaaS with KNative, the scripts to perform the characterization study on the open-source production-level traces and serverless benchmarks, and the experiment workflow to run these workloads. We have two main software portions.
First, we provide scripts to reproduce our characterization study. The scripts include the analyses of (i) the open-source production-level traces from Azure, and (ii) the open-source serverless benchmarks from FunctionBench. The scripts analyze (i) the request burstiness in serverless environments, (ii) the idle time of serverless functions, (iii) the breakdown of memory footprint of serverless functions, and (iv) the bursty access pattern in to the remote storage.
Second, we provide our implementation of MXFaaS: a novel serverless platform built upon KNative. MXFaaS includes two main components: (i) MXContainers that support efficient CPU, I/O and memory sharing across invocations of the same function, and (ii) Node Controller that supports core assignment across collocated MXContainers and extends auto-scaling features.
This artifact was tested on Intel (Haswell, Broadwell, Skylake), and AMD EPYC processors: Rome, Milan. Each processor has at least 8 cores.
This artifact requires Ubuntu 18.04+, Docker 23.0.1, minikube v1.29.0, and KNative.
First, clone our artifact repository: git clone https://github.com/jovans2/MXFaaS_Artifact.git
In the main directory of the repository, script setup.sh installs all the software dependencies: ./setup.sh.
The script will first install Docker and set up all the required privileges. Then, it will install minikube, as a local Kubernetes, convenient for testing purposes. Finally, it will install KNative. The script will ask twice to choose one of multiple options. Both times choose the default value.
Once the installation is completed, open a new terminal and execute the following command minikube tunnel.
To reproduce our characterization study we need open source traces from the Azure's production workload. We need (i) Azure Functions Blob Access Trace, and (ii) Azure Functions Invocation Trace. Download the traces in the characterization directory of our repository by running ./download-traces.sh.
To locally install all the libraries needed by our Python applications, execute ./install-libs.sh in the characterization directory.
After the Azure's traces are in the characterization directory, to run all of our characterization experiments you need to execute ./characterize.sh. This script will first analyze the request burstiness and bursty storage access pattern from Azure's traces, then it will analyze the serverless benchmarks from functions directory.
Running ./deploy.sh in the KNative_prototype directory deploys the target functions as MXContainers on the KNative. To test if all functions are successfully deployed, run kn service list. It should show all functions and their urls. After 2 minutes, the flag READY should be set to True. Each function can be invoked with curl . To test all functions at once, run python3 knative-all.py.
Next, we need to test the performance of MXContainers. There are three loads we test: Low, Medium and High. All loads use the Poission distribution. The scripts to run theexperiments are located in the experiments directory. To run all the experiments at once execute python3 run-all.py.