- Deployment guide of OpenFaaS for Kubernetes is available here: https://docs.openfaas.com/deployment/kubernetes/.
- Run benchmarks /install.sh to build & deploy all functions.
Notice: this operation takes some time. We can also build & deploy functions according to the description below: https://docs.openfaas.com/cli/build/.
Guidance is available here: https://github.com/tjulym/gray/tree/main/loadGen/README.md.
Notice: Be sure that OpenFaaS functions and workload generator work well before running thefollowing script. The project LoadGenSimClient cannot work if the LoadGen has not yet been deployed.
Compile gray/gsightCollector/ to generate a runnable jar package. Then, run
java -jar collector.jar LC.pod_name interval result_dir_name 192.168.1.1 2222 1 48833to collect metrics of corresponding functions under their solo-run. Notice: make sure Intel RDT is enabled and an allocation setting is applied to the pod or container (e.g., cpuset-cpus). Run
./models/collector/start.shand it will create a csv file that stores the metrics under a co-locating example. You can edit start.sh to set the QPS of LS workloads, edit models/collector/get_ml_data.py to set the amount of data to be collected, and edit models/collector/runBEPara.py to configure tasks that co-locate with the LS of social network.
The initial training dataset is in models/algorithm/data/. Run
pip install models/algorithm/requirements.txtto install dependencies. Run
python models/algorithm/RFR_model_training.pyto create a file named "RFR" to store the RM model, and csv file to store importance of the metrics. Run
python models/algorithm/plots_imports.pyto review the impurity based importance of the 16 metrics, and run
python models/algorithm/plots_imports_all.pyto show the importance of 16 metrics under all combinations of workload and server.
It's quite hard to show the whole system, so we provide an example of binary-search scheduling algorithm instead. The example uses randomly generated states of servers and workloads. And it invokes the actual RFR model trained above for checking SLA violation. Run
cd scheduler/src
javac util/test/GsightScheduler.java
java util.test.GsightSchedulerand it will show the scheduling result.