Install and use tpcc-MySQL

Source: Internet
Author: User

Author: skate
Time: 2013/03/25

Install and use tpcc-MySQL

Download Toolkit
Tpcc-MySQL is a product derived from tpcc. It is used to test the system performance of OLTP (online transaction processing, TPCC-MYSQL is open source TPC-C testing software. Its source code is put in Bazaar (bazaar is a distributed version control system, using GPL license protocol, it can run on Windows, GNU/Linux, UNIX, and Mac OS systems. Bazaar is sponsored by canonical (parent company of ubuntu). Therefore, you need to install the bazaar client first.

Installation Steps
1.
# Rpm-uvh

Http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

2
The bzr client has been installed:
# Yum install bzr

3
Use the bzr client to download the tpcc-mysql source code.
# Cd TMP

Premise:
3.1
Login https://launchpad.net/bzr register account and login

3.2
Go to personal information page https://launchpad.net /~ Userid

3.3
Generate key
# Ssh-keygen-T RSA

Then, publish the/root/. Ssh/id_rsa.pub Public Key to the project branch to launchpad.net by copying the content of the id_rsa.pub file
Https://launchpad.net /~ <Your ID>/+ editsshkeys and then submit

4
Use the bzr client to download the tpcc-mysql source code.
# Bzr branch LP :~ Percona-dev/perconatools/tpcc-MySQL

5
Compile and install
# Cd/tmp/tpcc-MySQL/src
# Make
Then the tpcc command line tool tpcc_load and tpcc_start will be generated under/tmp/tpcc-MySQL.

[Root @ racdb2 tpcc-mysql] # ll
Total 372
-RW-r -- 1 Root 1621 Mar 25 12:21 add_fkey_idx. SQL
-RW-r -- 1 Root 317 Mar 25 12:21 count. SQL
-RW-r -- 1 Root 3105 Mar 25 12:21 create_table. SQL
-RW-r -- 1 Root 763 Mar 25 12:21 drop_cons. SQL
-RW-r -- 1 Root 477 Mar 25 12:21 load. Sh
-RW-r -- 1 Root 851 Mar 25 12:21 readme
Drwxr-XR-x 2 root Root 4096 Mar 25 schema2
Drwxr-XR-x 5 root Root 4096 Mar 25 scripts
Drwxr-XR-x 2 root Root 4096 Mar 25 SRC
-RW-r -- 1 Root 25350 Mar 25 tpcc100-20130326
-RW-r -- 1 Root 68534 Mar 25 tpcc100-20130326vi
-Rwxr-XR-x 1 Root 65852 Mar 25 tpcc_load
-Rwxr-XR-x 1 Root 162254 Mar 25 tpcc_start

Tpcc-mysql has several important scripts
Create_table. SQL: create the required database tables. There are 9 tables in total.
Add_fkey_idx. SQL: Create an index and a foreign key
Drop_cons. SQL: delete Constraints

Installation Reference:
Http://blog.csdn.net/red10057/article/details/7667400
Http://blog.csdn.net/songxixi/article/details/8506796

 

Simple test and use
1. Generate Test Data
# Mysqladmin-u root-P create tpcc100 // create the required database
Mysql> mysql-u root-P tpcc <create_table. SQL // import table structure

Mysql> mysql-u root-P tpcc <add_fkey_idx. SQL // CREATE TABLE indexes and FK

[Root @ racdb2 tpcc-mysql] #./tpcc_load help
Usage: tpcc_load [server] [dB] [user] [pass] [warehouse]
Or
Tpcc_load [server] [dB] [user] [pass] [warehouse] [Part] [min_wh] [max_wh]
* [Part]: 1 = Items 2 = Warehouse 3 = Customer 4 = orders

For example, create 100 data warehouses and fill in data
[Root @ racdb2 tpcc-mysql] #./tpcc_load localhost tpcc100 root 'rootpassword' 100

2
Start test, tpcc_start usage
Usage: tpcc_start-H server_host-P port-D database_name-u mysql_user-P mysql_password-W warehouses-C connections-r accept-l running_time-I report_interval-F report_file-T trx_file

Common parameters:
-W: specify the number of warehouses, that is, to test several data warehouses, such as the 100 data warehouses created by the test worker.
-C: number of concurrent connections
-R specifies the time for warmup before the test starts. After pushing, the test results are better and more accurate.
-L specify the test duration
-I: Specify the report generation interval.
-F: Specify the report file name.

For 100 data warehouses, push for 120 seconds, 100 concurrent connections, and run for 3600 seconds. The results are stored in the current file tpcc100_20130325.
#./Tpcc_start-hlocalhost-D tpcc100-u root-P 'rootpwd'-W 100-C 100-r 120-l 3600-F tpcc100_20130325

 

 

--- End ----

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.