Dynimize Quickstart Tutorial
by David Yeager
Duration: 10 min
This tutorial will show you how to install Dynimize. We'll then use it to optimize a live MySQL process that's been running the Sysbench OLTP benchmark, obtaining a 46% increase in performance by applying Dynimize.
Part 1: Quickstart
Here's a quick overview of how to use Dynimize.
To install Dynimize, run the following commands.
Use your access token to start a subscription license for your host.
To start Dynimize, run
To check the status of Dynimize and any optimization targets, run:
Once a target process has been fully optimized, the above command will report:
It could take anywhere from 30 to 300s of CPU intensive activity from the target process before Dynimize has completed profiling and optimizing that process.
Deciding which applications to target can be done by editing the list of supported target exes in /etc/dyni.conf under the [exeList] section.
To stop Dynimize, run:
To stop the subscription license for this host, run:
Part 2: Benchmarking with Dynimize
In the remainder of this tutorial we'll demonstrate how to benchmark MySQL using the Sysbench OLTP benchmark, and then improve on the benchmark results by installing and running Dynimize alongside MySQL. We try to keep things as simple as possible, and so by no means is this meant to demonstrate the most realistic or optimal way to benchmark MySQL with Sysbench, or accurately measure the improvements Dynimize can achieve. This tutorial can be completed with any version of MySQL, MariaDB, or Percona Server, and it is assumed that one of these is already installed.
Note that the benchmark is run using a CPU bound setup, with --oltp-read-only=on so that the IO subsystem is not involved, and making sure the workload fits into RAM. This example was run on a cloud based VPS from OVH, with 2 vCPUs (2.4 Ghz Haswell), with 8 GB ram, and a 40 GB SSD. You can recreate this exact VM on OVH's public cloud by selecting the VPS-SSD-3 server option in their Beauharnois data center. We used Ubuntu 16.04.2 LTS with MySQL 5.7.18, and Sysbench 0.4.12. Note that Sysbench 0.4 is used in this tutorial because it can easily be installed from most Linux repositories. Note that Dynimize speedups can be more pronounced when running on KVM hypervisors, as is the case here.
1. Install Sysbench
apt-get based install:
yum based install:
2. Run sysbench
In the following commands, make sure to replace user and password with something appropriate. Here we use the database name testDB.
Lets start off with a fresh MySQL process:
Load a table for the Sysbench OLTP workload. Make sure to replace user and password as appropriate:
Perform a warm-up run:
Perform a measurement run (command is the same as warm-up):
These runs will produce results in the following format:
In this case we can see transactions per second of 1432.12 as highlighted above.
3. Repeat with Dynimize
Let's repeat that with Dynimize running. First install Dynimize and start a host license if you haven't already.
If you haven't already done so, install Dynimize:
If you haven't already started a subscription license for your host then use your access token to start one :
Now start Dynimize:
Perform another warmup run to get the mysqld process in the "dynimized" state:
After the warmup make sure mysqld is dynimized:
If the mysqld process is not yet dynimized then repeatedly run the warm-up followed by sudo dyni -status until mysqld shows up as dynimized.
Now that mysqld is dynimized, let's measure its performance again:
Which will output the following:
Here we see transactions per second of 2094.36, which is a 46% speedup from the baseline of 1432.12 tps.
That concludes this tutorial. Happy Dynimizing!