Skip to content

lhotari/workload-aggregation-visualizer

Repository files navigation

Multi-Tenant Workload Aggregation: Interactive Simulation & Visualization Tool

Overview

This simulation and visualization is inspired by Andrew Warfield's talk at FAST '23: "Building and Operating a Pretty Big Storage System (My Adventures in Amazon S3)".

This simulation was created to provide visualization of workload aggregation for a guest lecture in the Aalto University course "Networking at Scale and Advanced Applications" on March 18, 2025, covering Autoscaling challenges of multitenant SaaS platforms. You can find the slides here.

  • Multi-tenancy significantly reduces the peak-to-average ratio of overall system load
    • In general, systems must provision for peak demand, not average load to meet performance quality requirements
    • Lower peak-to-average ratios directly translate to fewer overprovisioned resources
    • This results in improved resource utilization and cost efficiency

Please note that this script contains many assumptions about the simulated workloads and doesn't necessarily match reality. The goal is to visualize the effects of workload aggregation on system load. The presentation contains more details about cases where workloads are correlated and don't follow the model used in this simulation.

Features of the simulation

  • Interactive Visualization: Dynamically adjust the number of aggregated workloads (k × k grid)
    • Keyboard Controls:
      • Use arrow keys (↑/↓/←/→) to adjust the number of workloads
      • Toggle between visualization modes with Tab key
      • Save screenshots with s key
      • Regenerate workloads by pressing Space or Enter key
      • Press q or Esc key to exit
  • Two Visualization Modes:
    • Workload Mode: Shows individual workloads and their aggregation
    • Overprovisioning Mode: Visualizes how the required overprovisioning factor decreases as more workloads are aggregated
  • Batch mode:
    • Generate image files and exit

Installation

  1. Install uv: https://docs.astral.sh/uv/getting-started/installation/

  2. Run the script directly (dependencies will be automatically installed when using uv):

    ./workload-aggregation-visualizer.py

Usage

Run the script to start in UI mode, the console will contain information about keybindings:

./workload-aggregation-visualizer.py

pass --help to see complete set of command line options

Visualization example

Images were generated with this command:

./workload-aggregation-visualizer.py --output-dir examples --format svg --plot-overprovisioning --batch

(Some images are omitted to simplify the example.) workload 1x1 - single workload visualization workload 5x5 - aggregation of 25 workloads workload 7x7 - aggregation of 49 workloads workload 10x10 - aggregation of 100 workloads Graph showing how overprovisioning factor decreases as k increases from 1 to 10

Presentation that includes this visualization

Resources related to multi-tenant SaaS and economics of scale in cloud services

These resources aren't necessarily directly related to the visualization in this project. They were the inspiration to create this visualization as well as some of the resources for the related presentation. Some resources are not directly related to multi-tenancy, but instead focus on reliability patterns for large systems.

License

This project is licensed under the MIT License with attribution requirements - see the LICENSE file for details.

Author

Created by Lari Hotari

About

A visualization tool demonstrating the effects of workload aggregation on system load

Resources

License

Stars

Watchers

Forks

Languages