This week, you will learn to monitor the system performance while running the TPC-C benchmark on MySQL. You will also learn what those performance metrics mean.
Follow the guide below. If you have any questions, don't hesitate to contact me via email (Mijin An / [email protected])
NOTE: This lab is based on the Linux environment. If you don't have a Linux machine, use VirturalBox. (Recommend Ubuntu 18.04)
- Before starting a MySQL server, update the buffer pool size to 10% of your TPC-C database size. For example, if you load 20 warehouses (e.g., about 2G database size), change the value of
innodb_buffer_pool_size
in my.cnf to 200M:
$ vi /path/to/my.cnf
...
innodb_buffer_pool_size=200M
...
- Start a MySQL server:
$ ./bin/mysqld_safe --defaults-file=/path/to/my.cnf
Run the benchmark by modifying the experimental parameters to match your system specifications. For example:
$ ./tpcc_start -h 127.0.0.1 -S /tmp/mysql.sock -d tpcc -u root -p "yourPassword" -w 20 -c 8 -r 10 -l 1200 | tee tpcc-result.txt
It means:
- Host: 127.0.0.1
- MySQL Socket: /tmp/mysql.sock
- DB: tpcc
- User: root
- Password: yourPassword
- Warehouse: 20
- Connection: 8
- Rampup time: 10 (sec)
- Measure: 1200 (sec)
-
While running the benchmark, collect performance metrics (e.g., I/O status and transaction throughput) and record them in a separate file for future analysis. Refer to the performance monitoring guide to gather performance metrics while running the TPC-C benchmark on MySQL 5.7
-
After the benchmark ends, take a screenshot of the TPC-C output and add it to your report
-
Shut down the MySQL server:
$ ./bin/mysqladmin -uroot -pyourPassword shutdown
- Run the TPC-C benchmark on MySQL
- Observe how the performance metrics and TpmC change over time
- Present the experimental results
- Analyze the results
Organize the results into a single report and submit it. Follow the submission guide for your report.