Skip to main content

Developed in PACS Lab as a performance simulator for serverless computing platforms.

Project description

Binder PyPI PyPI - Status PyPi Upload API Docker CI 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 simfaas

Upgrading using pip:

pip install simfaas --upgrade

For installation in development mode:

git clone https://github.com/pacslab/simfaas
cd simfaas
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 simfaas.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simfaas-0.2.1.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

simfaas-0.2.1-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file simfaas-0.2.1.tar.gz.

File metadata

  • Download URL: simfaas-0.2.1.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

File hashes

Hashes for simfaas-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9b06bbc24326d7161df5d14528d57352119021b446d9c67658c33ef43c747b29
MD5 3b3e06219dfe3fe00d13d54a522af850
BLAKE2b-256 9a5d52ffe6ff5a35a8ddf872ac2c5754179c594c7d58eb86d9af7723fc9b4ab4

See more details on using hashes here.

File details

Details for the file simfaas-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: simfaas-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

File hashes

Hashes for simfaas-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2371baee8680ffa6844de08b5e948003182cbe33b2029347181f4568f0012aa
MD5 e255a868e9fffd87231b9ed35eedacec
BLAKE2b-256 17975deeeb0293c61ef0fb2e4733d10d31cafe6a097db7d6c4f10242228e1688

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page