Overview | Installation | Usage | License
Disclaimer: The simulator is currently heavily work in progress!
A discrete time simulator to experiment with our real-time NFV scheduling controllers.
Simulator Workflow:
+--------------+
+-------------->| System State |-------------+
| | at time t | |
| +--------------+ V
+------------+ t:=0 +--------------+ +--------------+
| Initial |------------>| Run | | Run gradient |
| CPU shares | | system model | | optimization |
+------------+ +--------------+ +--------------+
^ |
| t:= t+1 +--------------+ |
+---------------| New |<------------+
| task weights |
+--------------+
- Python (>=3.6)
- Python packages listed in requirements.txt
The simulator contains many preset scenarios. Please jump to Run Simulations. If you are interested in fine-tuning the simulator or adding new pipelines, please refer to Config. To reproduce figures in the paper, check Reproduce Figures of the Paper.
The simulator reads configurations from command line arguments and from its settings file. For details of the simulator parameters, please refer to the paper.
Pipeline configurations are stored in the inputs folder.
The simulator reads the configratuion file from lib/settings.py.
To add new pipeline, simply create a .gml
file describing the new pipeline. The recommendation is to store these pipeline configurations in the inputs
folder.
The mobile gateway (MGW) is a complex pipeline with large number of modules and edges. To ease creating new configurations, an MGW config generator script is provided. This script generates .gml
files for the simulator based on an MGW implementation in BESS. For parameters, please refer to the help: python3 generate_mgw_config.py -h
The simulator is implemented in Python, and its entrypoint is simulator.py
. Almost all simulator parameters can be adjusted by command line parameters. For details of the parameters, please refer to the paper. To get a list of parameters, please refer to the help: python3 simulator.py -h
An example to simulate the configuration of the example pipeline (fork) with back-pressure enabled for 20
rounds, and save simulation results to results/optimize_out.txt
(after simulation, the plot will be shown):
python3 simulator.py -l INFO -p -i inputs/example_basic_back_pressure.gml -o results/optimize_out.txt -r 20
The simulator draws plots at the end of its execution. Simulation plots can be drawn using a stand-alone program as well:
python3 plot_results.py <simulator_output_csv>
Additional useful features:
- to print the dataset constructed from the simulator CSV:
-v
- to set a custom plot title:
-t <title>
- to save the plot in PNG:
-o <outfile>
Parameter α is responsible for weighing in the possible delay SLO violations, measured on the fork pipeline.
Figure | Command |
---|---|
Fig. 5a | python3 simulator.py --infile ./inputs/example_basic_new_estimate.gml --alpha 1.0 --delta 0.01 --rho_roughness 0.05 --rounds 50 --epsilon 1e-05 --plot |
Fig. 5b | python3 simulator.py --infile ./inputs/example_basic_new_estimate.gml --alpha 0.05 --delta 0.01 --rho_roughness 0.025 --rounds 50 --epsilon 1e-05 --plot |
Controller on pipelines taildrop and MGW accompanied with simultaneously satisfiable delay and rate SLOs, respectively. With α = 1, the controller found a feasible solution in 15 control periods in both cases.
Figure | Command |
---|---|
Fig. 6a | python3 simulator.py --infile ./inputs/taildrop.gml --alpha 1 --delta 0.01 --rho_roughness 0.025 --rounds 50 --epsilon 1e-05 --plot |
Fig. 6b | python3 simulator.py --infile ./inputs/mgw_default.gml --alph 1 --delta 0.01 --rho_roughness 0.025 --rounds 20 --epsilon 1e-05 --realloc_interval 10 --plot |
Licensed under GPLv3+.