Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Latest commit

 

History

History
85 lines (55 loc) · 5.1 KB

architecture.md

File metadata and controls

85 lines (55 loc) · 5.1 KB

Swan logo Swan

Architecture overview

Swan uses Snap to collect, process and tag metrics and stores all experiment's data in Cassandra database. From here, we provide a Jupyter environment to explore and visualize experiment results.

The first experiment bundled with Swan is a sensitivity experiment for the distributed data cache, memcached. The experiment allows to generate a so-called sensitivity profile, which describes the violation of Quality of Service under certain conditions, such as CPU cache or network bandwidth interference. An example of the sensitivity profile can be seen below.

Sensitivity profile

Following figure illustrates Memcached sensitivity experiment architecture.

Swan architecture

The main components here are:

  • The Swan host where experiment is carried out and metrics are collected
    • Protected workload is located on this host with dedicated isolation
    • Aggressor(s) are located on this host with dedicated isolation
  • The Cassandra cluster where Cassandra database responsible for storing experiments meta data from Swan and experiment results from Snap is located.
  • The Remote hosts which act as load generators for memcached. Mutilate agents are being run on remote hosts to put memcached on configured load. Note that mutilate agents tasks are under complete control over Swan.

Architecture details

Swan does not force any type of experiment. Instead, it provides abstractions and building blocks necessary for building experiments. Those abstractions helps with:

  • Managing life cycle of the workloads (launching, stopping, monitoring and intercepting output).
  • Isolating tasks (to test colocated workloads)

The life cycle abstraction is composed of the following interfaces:

  • Launcher which in general translates the workload configuration into string which can be directly launched as in command line. It offers method Launch().

  • Executor which takes care of how to launch the workload. It offers method Execute() which takes command as a string parameter.

  • TaskHandle which controls launched workload, has information about the task's status and is responsible of delivering workload's stderr and stdout. Launcher on Launch() and Executor on Execute() returns TaskHandle.

Isolation consists of a single interface:

  • Isolation which can be used to limit workload access to shared resources like CPU.

Swan provides already implemented executors:

  • Local - for launching workloads on Swan host
  • Remote - for launching workloads on remote hosts (using ssh)
  • Kubernetes - for launching workloads on kubernetes

and launchers for some aggressors that can be viewed at swan/pkg/workloads.

As an illustration for the abstractions above l1data aggressor Launcher implementation will be explained in detail. The l1data.New() method takes Executor and configuration as input parameters and then the workload can be started by calling l1data.Launch(). Internally in the Launch() method the command line string is build from provided configuration and then it's passed to the provided Executor which will take care of executing it (locally, remotely or on Kubernetes). Note that what to launch and how to launch it is clearly separated into two abstractions: Launcher and Executor. It allows using single Launcher with several Executors.

Results

Snap gathers experiment results using collector plugins for mutilate and caffe (in inference mode) and publish then using Cassandra publisher (see here for more details).

Experiment

The provided sensitivity experiment itself is composed from:

  • Validating and preparing environment
  • Launching workloads with proper order
  • measurement in the given time window
  • stopping workloads
  • gathering results and sending them to the Cassandra DB
  • repeating all the above changing aggressors, isolation, load and so on.

Examples of experiments can be found in experiments directory in Swan's repository.