Skip to main content

Serverless Performance Simulator

DOI Binder PyPI PyPI - Status Travis (.com) Documentation Status Libraries.io dependency status for latest release GitHub

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, the average probability of cold start, average running servers (directly reflecting average cost), a histogram of different events, distribution of the 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 platform.

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/pacslab/pacssim
cd pacssim
pip install -e .

And in case you want to be able to execute the examples:

pip install -r examples/requirements.txt

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:

@software{mahmoudi_nima_2020_3906617,
  author       = {Mahmoudi, Nima and
                  Khazaei, Hamzeh},
  title        = {{PACSSIM: A Performance Simulator for Serverless
                   Computing Platforms}},
  month        = jun,
  year         = 2020,
  publisher    = {Zenodo},
  version      = {0.1.3},
  doi          = {10.5281/zenodo.3906617},
  url          = {https://doi.org/10.5281/zenodo.3906617}
}

Metadata

Release files for pacssim 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pacssim 0.1.4
File Size Uploaded
pacssim-0.1.4.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pacssim 0.1.4
File Interpreter ABI Platform
pacssim-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 31.4 kB

Release files / pacssim-0.1.4.tar.gz

Download URL pacssim-0.1.4.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e7c19187d02598bf6813306a91a62e1e3bc35a5b60089f31a84c24b0e8b7a01b
BLAKE2b-256 checksum
How to use checksums
440b5155201cf98efbc762b73c63307b47d16f4c4d9fef8a83d3d20859eb0e06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 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

Release files / pacssim-0.1.4-py3-none-any.whl

Download URL pacssim-0.1.4-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5433a10aad6e899b83ac5f5a7d8a3f3aff4b999aca2c7e880b4b27098915a524
BLAKE2b-256 checksum
How to use checksums
0834246eb66019e135db90e9b86b5ce44d97fe2ea0c82afb9d0100ab2238be7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 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

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page