This benchmarking tool is used in order to run automated benchmarking tests against a MySQL server. It allows you to mimic large amounts of data warehouses.
To download, compile and install DBT2, please enter the following commands on the container's CLI:
# cd /srv/www # wget -O dbt2-0.37.tar.gz https://master.dl.sourceforge.net/project/osdldbt/dbt2/0.37/dbt2-0.37.tar.gz # tar -xvf dbt2-0.37.tar.gz # cd dbt2-0.37.tar.gz # ./configure --with-mysql # make # make install # cpan install Statistics::Descriptive # mkdir -p /srv/mysql/dbt2-tmp-data/dbt2-w3 # ./src/datagen -w 3 -d /srv/mysql/dbt2-tmp-data/dbt2-w3 --mysql
Once the data warehouses have been created, you should see the following messages:
You will now have to modify the file scripts/mysql/mysql_load_db.sh using the vi editor:
# vi scripts/mysql/mysql_load_db.sh
Once inside the editor, type /LOAD DATA and press Enter. Position your cursor at the end of this line, press I and enter the word IGNORE in uppercase. Your file should look like this once you are done editing it:
Once done, press the Esc key and then type :wq. This will save the changes and close the vi editor.
Now, enter the following command to load the test data into the database:
# ./scripts/mysql/mysql_load_db.sh -d dbt2 -f /srv/mysql/dbt2-tmp-data/dbt2-w3 -s /run/mysqld/mysqld.sock -u root
Once the data has been loaded into the database, you should see the following messages:
To launch the test, enter this command:
# ./scripts/run_mysql.sh -n dbt2 -o /run/mysqld/mysqld.sock -u root -w 3 -t 300 -c 20
Once you have entered the command, you will first see this message:
You will also get the following messages:
After approximately five minutes, you will get the results of the benchmark tests:
As we can see from the given results, we can have a good idea of our database server's performance in the context of large data warehouses. Additional tests could easily confirm the server's limits through edge-case testing. Let's run one such test using SysBench.