Databases Reference
In-Depth Information
a CPU-bound workload, you shouldn't make the time too long, or the dataset
might grow significantly and become I/O-bound.
This benchmark's results can provide information on more than just performance. For
example, if you see too many rollbacks, you'll know something is likely to be wrong.
Percona's TPCC-MySQL Tool
Although it's great for simple tests and comparisons, the workload that sysbench gen-
erates is not really relevant to any real-world application. The TPC-C benchmark is
much better for that. Although the dbt2 tool shown in the previous section is one fair-
use implementation of that benchmark, it has some drawbacks. These prompted the
authors of this topic to create another TCP-C-like benchmark tool better suited to
running a lot of very large benchmarks. The code is available through Launchpad at
https://code.launchpad.net/~percona-dev/perconatools/tpcc-mysql , and there is a brief
README file that explains how to build and use the tool. It is quite simple to use. For
large numbers of warehouses, you might want to consider using the parallel data load-
ing utility included with the tool, because otherwise it can take a long time to generate
the dataset.
To use the tool, you need to create the database and table structures, load the data, and
then execute the benchmark. The database and table structures are simple SQL scripts
included with the source code, and the data loading is accomplished through the
tpcc_load C program, which you must compile. This will run for a while and produce
a great deal of output. (You should always redirect program output to files for docu-
mentation purposes, but here you really need to do so, or you might even lose your
scrollback history.) Here is an example setup, creating a small (five warehouses) dataset
in a database named tpcc5 :
$ ./tpcc_load localhost tpcc5 username p4ssword 5
*************************************
*** ###easy### TPC-C Data Loader ***
*************************************
<Parameters>
[server]: localhost
[port]: 3306
[DBname]: tpcc5
[user]: username
[pass]: p4ssword
[warehouse]: 5
TPCC Data Load Started...
Loading Item
.................................................. 5000
.................................................. 10000
.................................................. 15000
[output snipped for brevity]
Loading Orders for D=10, W= 5
.......... 1000
 
Search WWH ::




Custom Search