• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An open source tool for testing and profiling FaaS and serverless platforms

FaaSProfiler Β· GitHub license

FaaSProfiler is a tool for testing and profiling FaaS platforms. We built FaaSProfiler based on the real needs and limitations we faced early on conducting our serverless research:

  • Arbitrary mix of functions and invocation patterns. FaaSProfiler enables the description of various invocation patterns, function mixes, and activity windows in a clean, user-friendly format.
  • FaaS-testing not plug-and-play. Each function should be invoked independently at the right time. Precisely invoking hundreds or thousands of functions per second needs a reliable, automated tool. We achieve this with FaaSProfiler.
  • Large amount of performance and profiling data. FaaSProfiler enables fast analysis of performance profiling data (e.g., latency, execution time, wait time, etc.) together with resource profiling data (e.g. L1-D MPKI, LLC misses, block I/O, etc.). The user can specify which parameters to profile and make use of the rich feature sets of open-source data analysis libraries like Python pandas

We have used FaaSProfiler for our research and will continue to use and improve it. We hope it accelerates testing early-stage research ideas for others by enabling quick and precise profiling of FaaS platforms on real servers. Enjoy this tool, and please don't forget citing our research paper when you use it:

Mohammad Shahrad, Jonathan Balkind, and David Wentzlaff. "Architectural Implications of Function-as-a-Service Computing." 2019 52nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO 52), October 2019.

Setting Things Up

Set up OpenWhisk if testing locally

[You don't need this if you intend to use the generic endpoint mode to test remote functions.]

FaaSProfiler has been fully tested on OpenWhisk. Please make sure to set up and install OpenWhisk before using FaaSProfiler.

Important Note: Some of the default OpenWhisk configuration limits might be too restrictive for your setup. Do not forget to configure those parameters (particularly these: invocationsPerMinute, concurrentInvocations, firesPerMinute, and sequenceMaxLength).

Configure FaaSProfiler

After cloning this repo run the one-time configuration script:

bash configure.sh

Usage Guide

Specify the Test

The first step is to prepare a workload configuration file that tells FaaSProfiler about your scenario. A sample workload configuration file, called workload_configs_local_openwhisk.json, has been provided. You can base your own on this JSON file and configure it. Here are some details:

  1. Primary fields:
    1. test_duration_in_seconds: Determines the length of the test in seconds.
    2. random_seed: If set to null, the randomization seed varies with time. For deterministic invocations set this variable to a 32-bit unsigned integer.
    3. blocking_cli: This true/false option determines whether consecutive invocations use blocking cli calls.
    4. endpoint: Specifies the endpoint type for functions to be invoked. By default, the value is set to "local_openwhisk", which denotes functions are deployed on an OpenWhisk deployed locally (on the same machine that hosts FaaSProfiler). Changing the value to "generic" allows invoking remote functions (e.g., on AWS Lambda, Google Cloud Functions, etc.). Skimming through the workload_configs_generic_endpoint.json can guide you on how to use this option. Note that when invoking remote functions with the generic endpoint, you won't be able to do performance profiling and effectively, FaaSProfiler becomes a tool to assist you in creating precise and reproducible invocations.
    5. instances: This is a collection of invocation instances. Each instance describes the invocation behavior for an application (OpenWhisk action). However, multiple instances of the same application can also be deployed with different distributions, input parameters, or activity windows to create more complicated patterns.
  2. Each invocation instance:
    1. application: This should be the same as the OpenWhisk action name. (You can see the list of successfully built OpenWhisk actions using wsk action list -i)
    2. FaaSProfiler supports two invocation types. You need to select one, for each instance, and configure it accordingly. i. Synthetic traffic: 1. distribution: SWI currently supports Uniform and Poisson distributions. 2. rate: Function invocations per second. For a Poisson distribution, this is lambda. A rate of zero means no invocations. ii. Trace-based traffic: 1. interarrivals_list: The list of interarrival times. This mode allows replaying real traces using FaaSProfiler.
    3. activity_window: If set to null, the application is invoked during the entire test. By setting a time window, one can limit the activity of the application to a sub-interval of the test. There is no need to provide this parameter when using trace-based traffic.
    4. param_file: This optional entry allows specifying an input parameter JSON file, similar to option -P in WSK CLI.
    5. data_file: This optional entry allows specifying binary input files such as images for the function.
  3. Performance monitoring (perf_monitoring) field, where you can specify:
    1. runtime_script: This is a script that is run at the beginning of the test. Therefore, it allows specifying performance monitoring tools such as perf, pqos, or blktrace to run at the same time as the test. An example for this script is provided at monitoring/RuntimeMonitoring.sh. This field can be ignored by setting it to null.
    2. post_script: This is a script that runs after the test ends which aims to allow automating post-analysis. This field can be ignored by setting it to null.

We advise the user to go over the workload_configs.json file to familiarize themselves with these fields.

Run the Test

Simply run the following script (replace CONFIG_FILE with the name of your workload config file):

./WorkloadInvoker -c CONFIG_FILE

Test logs can be found in logs/SWI.log.

Analyze the Test

The Workload Analyzer module analyzes a workload after it is run. Here is how to use it:

  1. Run the Workload Analyzer:
./WorkloadAnalyzer -r -p
  1. Certain features can be controlled by input arguments:
    1. -v or --verbose: prints the detailed test data
    2. -p or --plot: plots the test results
    3. -s or --save_plot: save test result plots (this option should be used with -p)
    4. -a or --archive: archive the test results in an pickle file (in the data_archive directory)
    5. -r or --read_results: also gather the results of function invocations
  2. Analysis logs can be found in logs/WA.log.

Compare Archived Tests

The Comparative Analyzer module compares the results of tests archived in the data_archive directory.

Latest Tested Environments

Environment/Tool Tested Version(s)
Python 3.8 (fully tested), 3.10 (partially tested)
OS Ubuntu 16.04.4 LTS, Ubuntu 20.04.1 LTS
Python Library Latest Tested Version
requests-futures 1.0.1
matplotlib 3.3.3
numpy 1.19.5
pandas 1.2.0
seaborn 0.11.1

More Repositories

1

openpiton

The OpenPiton Platform
Assembly
604
star
2

VST

Verified Software Toolchain
Coq
441
star
3

multi_gpu_training

Python
258
star
4

athena

Athena++ radiation GRMHD code and adaptive mesh refinement (AMR) framework
C++
225
star
5

prga

Open-source FPGA research and prototyping framework.
SCSS
194
star
6

athena-public-version

(MOVED) Athena++ GRMHD code and adaptive mesh refinement (AMR) framework. Active repository --->
C++
158
star
7

hpc_beginning_workshop

Shell
138
star
8

gpu_programming_intro

C++
96
star
9

PsyNeuLink

A block modeling system for cognitive neuroscience
Python
86
star
10

ILAng

A Modeling and Verification Platform for SoCs using ILAs
C++
75
star
11

AutoSVA

AutoSVA is a tool to automatically generate formal testbenches for unit-level RTL verification. The goal is to, based on annotations made in the signal declaration section of an RTL module, generate liveness properties so that the module would eventually make forward progress.
Python
72
star
12

DP_GP_cluster

Python
69
star
13

STELLOPT

This is the GitHub repository for STELLOPT, the state-of-the-art stellarator optimization code.
Fortran
68
star
14

princeton-mvpa-toolbox

Automatically exported from code.google.com/p/princeton-mvpa-toolbox
MATLAB
64
star
15

magnet

Open Source Research Platform for Power Magnetics Modeling
Python
62
star
16

removing_tedium

Shell
53
star
17

Athena-Cversion

C
50
star
18

FastTemplatePeriodogram

NlogN algorithm for least-squares fitting of periodic templates to noisy, non-equispaced time-series data.
Jupyter Notebook
48
star
19

accelerator-wall

Repository for the tools and non-commercial data used for the "Accelerator wall" paper.
Python
45
star
20

historic_state_legislative_election_results

Dataset of state legislative elections from 1971–2018.
Python
45
star
21

auto-qchem

Auto-QChem is an automated workflow for the generation and storage of DFT calculations for organic molecules.
Jupyter Notebook
44
star
22

muchiSim

Simulator framework for analysis of performance, energy consumption, area and cost of multi-node multi-chiplet tile-based manycore designs
C++
44
star
23

lucid

OCaml
39
star
24

piton-linux

Linux Kernel for OpenPiton
C
35
star
25

cpf

Collaborative Parallelization Framework (CPF)
C++
31
star
26

EDIPIC-2D

Fortran
30
star
27

SCAF

A Speculation-Aware Collaborative Dependence Analysis Framework
C++
28
star
28

MosaicSim

Heterogeneous simulator for DECADES Project
C++
28
star
29

DeepSpecDB

Coq
27
star
30

COS461-Spring2016

Computer Networks (COS 461), Princeton University, Spring 2016
Jupyter Notebook
26
star
31

gerrymandertests

Lots of metrics for quantifying gerrymandering.
Python
25
star
32

SPEC

The Stepped-Pressure Equilibrium Code, an advanced MRxMHD equilibrium solver.
SourcePawn
24
star
33

OPDB

OpenPiton Design Benchmark
Verilog
22
star
34

jobstats

Python
21
star
35

IMDb-Archive

ILA Model Database
C++
20
star
36

advanced-command-line

Shell
19
star
37

smappic

Assembly
19
star
38

BrainPipe

Jupyter Notebook
18
star
39

IBDmix

C++
18
star
40

primesim

A parallel and distributed simulator for thousand-core chips
C++
18
star
41

HPC_R_Workshop

Shell
18
star
42

MouseMotionMapper

Matlab pipeline for semi-supervised mouse behavioral classification
MATLAB
18
star
43

maple

MAPLE's hardware-software co-design allows programs to perform long-latency memory accesses asynchronously from the core, avoiding pipeline stalls, and enabling greater memory parallelism (MLP).
C
18
star
44

EDIPIC

Fortran
17
star
45

intro_machine_learning

Jupyter Notebook
17
star
46

fcma-toolbox

Princeton Full Correlation Matrix Analysis (FCMA) Toolbox
C++
16
star
47

piton-sw

Forth
16
star
48

FOCUS

Flexible Optimized Coils Using Space curves
Fortran
16
star
49

install_lammps

Shell
16
star
50

Dashlet

HTML
15
star
51

SPECFEMPP

SPECFEM++ is a complete re-write of SPECFEM suite of packages (SPECFEM2D, SPECFEM3D, SPECFEM3D_GLOBE) using C++
C++
15
star
52

Duet

Assembly
15
star
53

prsonpipe

fMRI analysis pipeline
Shell
14
star
54

cwf_denoise

Covariance Estimation and Denoising for Cryo-EM Images (Covariance Wiener Filtering)
MATLAB
14
star
55

3D3A-MATLAB-Toolbox

Collection of various MATLAB functions for spatial audio processing released by the 3D3A Lab at Princeton University
MATLAB
14
star
56

aspire

Algorithms for Single Particle Reconstruction
MATLAB
13
star
57

compcomp

Compositional CompCert
Coq
12
star
58

tristan-mp-v2

Tristan-MP v2 [public]
Fortran
12
star
59

pktgen

DPDK-based Packet Generator
C
11
star
60

APPLEpicker-python

Python
10
star
61

lightsheet_helper_scripts

Jupyter Notebook
10
star
62

intro_ml_libs

Shell
10
star
63

globus-stats

Pull transfer logs from Globus.org and plot various graphs.
PHP
9
star
64

APPLEpicker

Automatic Particle Picking, a Low-Effort Cryo-EM Framework
MATLAB
9
star
65

cScope

MATLAB
8
star
66

astro-tigress

Python
8
star
67

prga.py

Python API for PRGA: https://github.com/PrincetonUniversity/prga
Python
7
star
68

ttm-cas

Jupyter Notebook
7
star
69

running_gromacs

Shell
7
star
70

pywsse

WSSE authentication implementations for various server backends/clients.
Python
7
star
71

slurm_mnist

Python
7
star
72

PGscen

Python
7
star
73

hypersio

C++
7
star
74

Iseult

Python plotting program for Tristan-MP
Python
7
star
75

software_testing

Python
7
star
76

3D3A-SABRE-Toolkit

A toolkit for customizing the ambiX ambisonics-to-binaural renderer
MATLAB
7
star
77

gerryspam

Python
7
star
78

3D3A-Mathematica-Toolbox

Mathematica
7
star
79

flux-ratio-based-gibbs-energy

Determine free energy of reaction and its confidence interval via metabolic flux analysis and optimization
MATLAB
7
star
80

ILAng-Doc

ILAng documentation
TeX
6
star
81

data-visualization-python-2022

Jupyter Notebook
6
star
82

specvols

MATLAB
6
star
83

jenkins-getting-started

Tutorial for getting started with Princeton University's Jenkins Server
6
star
84

blocklint

Python
6
star
85

intro_debugging

Python
6
star
86

gerrymander-geoprocessing

A loose collection of utilities for preprocessing geographic data for studying redistricting.
Python
6
star
87

BLPSLibrary

Groff
5
star
88

p-cit-toolbox

MATLAB
5
star
89

codePost-tools

Custom terminal tools for Princeton University to manage codePost.
Python
5
star
90

PROMPT

C++
5
star
91

msddm

Code for the multistage DDM
MATLAB
5
star
92

pyvpic

Python tools for access, analysis, and visualization of VPIC data
Python
5
star
93

pytlas

Jupyter Notebook
5
star
94

IMDb

The ILA model database
5
star
95

Vatic

Python
5
star
96

ILA_Rocket

Verilog
5
star
97

VA-gerrymander

A map to remedy VA's unconstitutional House of Delegates districts, with accompanying analysis
HTML
5
star
98

a100_workshop

Cuda
4
star
99

fusionrate

Fusion cross sections and rate coefficients
Python
4
star
100

Cov3D

3D Covariance Estimation for Cryo-EM
MATLAB
4
star