Developed in PACS Lab as a performance simulator for serverless computing platforms.
Project description
This is a project done in PACS Lab aiming to develop a performance simulator for serverless computing platforms. Using this simulator, we can calculate Quality of Service (QoS) metrics like average response time, average probability of cold start, average running servers (directly reflecting average cost), histogram of different events, distribution of number of servers throughout time, and many other characteristics.
The developed performance model can be used to debug/improve analytical performance models, try new and improved management schema, or dig up a whole lot of properties of a common modern scale-per-request serverless platforms.
Artifacts
Requirements
Python 3.6 or above
PIP
Installation
Install using pip:
pip install pacssim
Upgrading using pip:
pip install pacssim --upgrade
For installation in development mode:
git clone https://github.com/nimamahmoudi/serverless-performance-simulator
cd serverless-performance-simulator
pip install -e .
Usage
A simple usage of the serverless simulator is shown in the following:
from pacssim.ServerlessSimulator import ServerlessSimulator as Sim
sim = Sim(arrival_rate=0.9, warm_service_rate=1/1.991, cold_service_rate=1/2.244,
expiration_threshold=600, max_time=1e6)
sim.generate_trace(debug_print=False, progress=True)
sim.print_trace_results()
Which prints an output similar to the following:
100%|██████████| 1000000/1000000 [00:42<00:00, 23410.45it/s] Cold Starts / total requests: 1213 / 898469 Cold Start Probability: 0.0014 Rejection / total requests: 0 / 898469 Rejection Probability: 0.0000 Average Instance Life Span: 6335.1337 Average Server Count: 7.6612 Average Running Count: 1.7879 Average Idle Count: 5.8733
Using this information, you can predict the behaviour of your system in production.
Development
In case you are interested in improving this work, you are always welcome to open up a pull request. In case you need more details or explanation, contact me.
To get up and running with the environment, run the following after installing Anaconda:
conda env create -f environment.yml
conda activate simenv
pip install -r requirements.txt
pip install -e .
After updating the README.md, use the following to update the README.rst accordingly:
bash .travis/readme_prep.sh
Examples
Some of the possible use cases of the serverless performance simulator are shown in the examples folder in our Github repository.
License
Unless otherwise specified:
MIT (c) 2020 Nima Mahmoudi & Hamzeh Khazaei
Citation
You can find the paper with details of the simultor in PACS lab website. You can use the following bibtex entry for citing our work:
Coming soon...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pacssim-0.1.0.tar.gz
.
File metadata
- Download URL: pacssim-0.1.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0b44d788017e9acbecfa9fc1bc1b6c7e77e181d0722459be73dd4b950e217f7 |
|
MD5 | 45f9ad71e0d5aefe4b7376a0bff0f114 |
|
BLAKE2b-256 | cd0e2edbe63949999bd59cff56c6b6cbea49654fc7b2bc4d9546b812b428590a |
File details
Details for the file pacssim-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pacssim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44e5c316881b5638bf822044cfd72848b07e21b8a82bfb0994f50d20c45363fa |
|
MD5 | 5819dc627c9b8e685c362ca3321da8dc |
|
BLAKE2b-256 | 88e6102b8205f3b99d787f37bc6dea2bbcf1a696f368a2d7df0167cf08091321 |