KVM Experiment Pattern

This is a simple tutorial experiment which shows how to launch an instance on the Chameleon KVM cloud, and configure its performance through Linux Control Groups (cgroups).

This experiment is broken up into 6 parts:

Spawning a Virtual Machine on Chameleon

  1. Setting up the environment
  2. Spawning the VM
  3. Adding the VM to the 'Allow SSH' security group
  4. Associating a floating IP

Benchmarking performance in the default configuration

  1. Opening a remote connection to the VM
  2. Installing sysbench
  3. Running the benchmark

Using cgroups to limit CPU performance

  1. Create a CPU throttle cgroup
  2. Limit the period and quota configs

Benchmarking performance after modifying cgroups

  1. Run the benchmark again under the throttled cgroup

Comparing our benchmarks

  1. Plot events with matplotlib
  2. Plot latency with matplotlib

Clean up

  1. Delete the VM
  2. Release the floating IP

Changelog

  • 2022-07-11 Initial version
  • 2022-08-24 Edited title and tags to reflect that this is an experiment pattern
  • 2022-11-09 Add code to release floating IP
13 4 2 3 Nov. 9, 2022, 5:52 PM

Authors

Launch on Chameleon

Launching this artifact will open it within Chameleon’s shared Jupyter experiment environment, which is accessible to all Chameleon users with an active allocation.

Download Archive

Download an archive containing the files of this artifact.