A tool to efficiently test cloud resource configurations for distributed applications
- After making changes to Java code, recompile it and reupload Docker images to Docker Hub using the
make
command. - Set up Prometheus (and take it down) in one of two ways:
make prom-mini-up
andmake prom-mini-clean
if using the Prometheus addon for MiniShift,make clean-prom
andmake up-prom
if using a Prometheus Docker image on an OpenShift cluster.
make clean-all
andmake up-all
commands should be used after making changes to the pods that normally stay up between experimental runs.make clean
andmake up
are the basic commands to run an experiment.- If using MiniShift,
python experiment.py
is a more convenient way to run an experiment that also retrieves Prometheus data to a local directory.python plot_experiment.py
can then be used to generate basic Matplotlib plots from that data (but see the R plotting code for more advanced plots).
- If using MiniShift,
control-pod.yaml
: on MiniShift,securityContext
must be configured asprivileged: true
. On OpenShift, simply comment out the two lines.Makefile
: on MiniShift,control-pv.yaml
should be included in bothclean-all
andup-all
commands. On OpenShift, you may or may not want to comment out the two lines, depending on if the system automatically serves persistent volumes or not.global.yaml
: on MiniShift, if using the Prometheus addon, setprometheusUsesHttps
to true. On OpenShift, if using a Prometheus Docker image, set it to false.
config
components.yaml
: a configuration file that lays out a chain of components and their resource usage (used automatically)flink-conf.yaml
: the configuration file for Flink (added to the Docker image)global_periodic.yaml
: a different version ofglobal.yaml
, one with strictly periodic workloadglobal.yaml
: all other configurable parameters (used automatically)ml_components.yaml
: an examplecomponents.yaml
file that mimics a machine learning system (I/O is optional)prometheus.yml
: the configuration file for Prometheus (used manually)
data
: each file records a single experiment. Each filename has four parts:- what performance metric was measured (
cpu
,heap
, orthroughput
) - the expected amount of memory (64, 128, 256, or 512 MiB)
- the size of the output string (1, 2, 4, ..., 256 MiB)
- run ID (in case there are multiple runs with the same parameters)
- what performance metric was measured (
docker
: all files needed to set up Docker Compose and/or OpenShiftdocker-compose.yml
: a Docker Compose file that was used as a basis for the OpenShift setupDockerfile.bench
: a Dockerfile for the Flink JobManagers and TaskManagersDockerfile.control
: a Dockerfile for the control serverDockerfile.prom
: a Dockerfile for PrometheusDockerfile.start
: a Dockerfile that starts the Flink applicationopenshift
: OpenShift manifestos generated using Kompose (with some modifications and additions)
experiment.py
: the primary way to run a MiniShift experiment and get Prometheus data to a local directorylocal_experiments
: experiments with standalone Java applications similar to the main Component classio_memory_tests
: does the I/O system use the right amount of memory? Barely.io_runtime_tests
: does the I/O system take the right amount of time? Usually.linkedlist*
andRandomList.java
: how long does it take to add a random number to a linked list?
memory_tests
: does the main Component class use the right amount of memory? Yes!analysis*.R
: data analysis and plots using RComponent.java
: versions of the original Component class adapted to be run without Flinkexperiment*.py
: Python scripts that run Component with various parameters and capture its performance in a CSV fileFullComponent.java
: similar to Component.java, but used to check the performance after adjusting the constantsplots
and*.png
: plots specific to that set of experimentsresults*.csv
: column names can be found in the analysis files
Makefile
: some builds are used manually, and some are used by scripts such asexperiment.py
plot_experiment.py
: after performing an experiment withexperiment.py
, this is an easy way to visualise the resultsplots
: all plots that are not fromlocal_experiments
plotting_code
: R and Python scripts for plottingplot_cpu_experiments.R
: plots CPU data fromdata
plot_example_pdf.R
: used to illustrate my definition of a p-valueplot_function.py
: used to illustrate how function-based workload worksplot_memory_experiments.R
: plots memory usage data fromdata
plottting.R
: a helper function that draws better heatmaps (with the colour bar scaled and adjusted)
prometheus
: the Prometheus MiniShift addon from here with minor modificationsreport
: you might want to read ittalk
: slides for a talk midway through the project
src/main/java
: all Java classes meant for the actual application (rather than separate experiments)validator
: R code that uses statistics to answer the question: does the experimental data fit our expectations?