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
- Setting up the environment
- Spawning the VM
- Creating the 'Allow SSH' security group
- Adding the VM to the 'Allow SSH' security group
- Associating a floating IP
Benchmarking performance in the default configuration
- Opening a remote connection to the VM
- Installing sysbench
- Running the benchmark
Using cgroups to limit CPU performance
- Create a CPU throttle cgroup
- Limit the period and quota configs
Benchmarking performance after modifying cgroups
- Run the benchmark again under the throttled cgroup
Comparing our benchmarks
- Plot events with
matplotlib
- Plot latency with
matplotlib
Clean up
- Delete the VM
- 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
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 ArchiveDownload an archive containing the files of this artifact.