DBT2

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:

Confirmation that the database warehouses have been created

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:

Inserting the string "IGNORE" on the "LOAD DATA" line of the 'mysql_load_db.sh' script

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:

Confirmation that the data is being loaded into the database

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:

Confirmation that the tests have begun

You will also get the following messages:

Confirmation that the tests are running

After approximately five minutes, you will get the results of the benchmark tests:

Confirmation that the tests are completed

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset