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. Creating the 'Allow SSH' security group
  4. Adding the VM to the 'Allow SSH' security group
  5. 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

  • 2023-04-25 Add code to create a new volume
  • 2023-04-21 Create SSH security group, show how to mount a Cinder volume
  • 2022-11-09 Add code to release floating IP
  • 2022-08-24 Edited title and tags to reflect that this is an experiment pattern
  • 2022-07-11 Initial version
94 17 9 5 Aug. 31, 2023, 7:23 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.

Version Stats

56 8 7