Tppc_mysql benchmark test performance analysis tool

Source: Internet
Author: User

It is relatively easy to install the tool! ,

Get source code:
Yum install bzr
Bzr branch LP :~ Percona-dev/perconatools/tpcc-MySQL

You can run the make command to install the src directory. However, the following error occurs due to changes in the MySQL environment. For example;

[Root @ slave01 SRC] # Make
CC-w-O2-g-I. 'mysql _ config -- include '-C load. c
Load. C: 18: 19: Error: mysql. h: no such file or directory
In File sorted ded from load. C: 20:
Spt_proc.h: 1: Error: Expected ?? Before ?? Token
Load. C: 26: Error: Expected ?? ?? ?? SM? Or partition _ attribute __? Before ?? Token
Load. C: 27: Error: Expected ?? ?? ?? SM? Or partition _ attribute __? Before ?? Token
Load. C: 49: Error: Expected ?? Before ?? Token
Load. C: In function again ain?
Load. C: 80: Error: policysql? Undeclared (first use in this function)
Load. C: 80: Error: (each undeclared identifier is reported only once
Load. C: 80: Error: for each function it appears in .)
Load. C: 80: Error: ESP? Undeclared (first use in this function)
Load. C: 183: Error: policysql? Undeclared (first use in this function)
Load. C: 203: Error: effectmt? Undeclared (first use in this function)
Load. C: In function compute oaditems?
Load. C: 312: Error: ysql_bind? Undeclared (first use in this function)
Load. C: 312: Error: Expected ?? Before login Aram?
Load. C: 366: Error: Role Aram? Undeclared (first use in this function)
Load. C: 367: Error: policysql_type_long? Undeclared (first use in this function)
Load. C: 371: Error: policysql_type_string? Undeclared (first use in this function)
Load. C: 374: Error: policysql_type_float? Undeclared (first use in this function)
Load. C: 379: Error: effectmt? Undeclared (first use in this function)
Load. C: 397: Error: policysql? Undeclared (first use in this function)
Load. C: In function compute oadware?
Load. C: 428: Error: ysql_bind? Undeclared (first use in this function)
Load. C: 428: Error: Expected ?? Before login Aram?
Load. C: 459: Error: Role Aram? Undeclared (first use in this function)
Load. C: 460: Error: policysql_type_long? Undeclared (first use in this function)
Load. C: 462: Error: policysql_type_string? Undeclared (first use in this function)
Load. C: 480: Error: policysql_type_float? Undeclared (first use in this function)
Load. C: 484: Error: effectmt? Undeclared (first use in this function)
Load. C: 492: Error: policysql? Undeclared (first use in this function)
Load. C: In function compute oadcust?
Load. C: 521: Error: policysql? Undeclared (first use in this function)
Load. C: In function compute oadord?
Load. C: 550: Error: policysql? Undeclared (first use in this function)
Load. C: In function compute Tock?
Load. C: 590: Error: ysql_bind? Undeclared (first use in this function)
Load. C: 590: Error: Expected ?? Before login Aram?
Load. C: 644: Error: Role Aram? Undeclared (first use in this function)
Load. C: 645: Error: policysql_type_long? Undeclared (first use in this function)
Load. C: 651: Error: policysql_type_string? Undeclared (first use in this function)
Load. C: 684: Error: effectmt? Undeclared (first use in this function)
Load. C: In function policistrict?
Load. C: 732: Error: ysql_bind? Undeclared (first use in this function)
Load. C: 732: Error: Expected ?? Before login Aram?
Load. C: 756: Error: Role Aram? Undeclared (first use in this function)
Load. C: 757: Error: policysql_type_long? Undeclared (first use in this function)
Load. C: 761: Error: policysql_type_string? Undeclared (first use in this function)
Load. C: 779: Error: policysql_type_float? Undeclared (first use in this function)
Load. C: 785: Error: effectmt? Undeclared (first use in this function)
Load. C: In function extends ustomer?
Load. C: 838: Error: ysql_bind? Undeclared (first use in this function)
Load. C: 838: Error: Expected ?? Before login Aram?
Load. C: 892: Error: Role Aram? Undeclared (first use in this function)
Load. C: 893: Error: policysql_type_long? Undeclared (first use in this function)
Load. C: 899: Error: policysql_type_string? Undeclared (first use in this function)
Load. C: 934: Error: policysql_type_float? Undeclared (first use in this function)
Load. C: 941: Error: effectmt? Undeclared (first use in this function)
Load. C: 987: Error: policysql? Undeclared (first use in this function)
Load. C: In function compute rders?
Load. C: 1024: Error: ysql_bind? Undeclared (first use in this function)
Load. C: 1024: Error: Expected ?? Before login Aram?
Load. C: 1051: Error: Role Aram? Undeclared (first use in this function)
Load. C: 1052: Error: policysql_type_long? Undeclared (first use in this function)
Load. C: 1060: Error: policysql_type_string? Undeclared (first use in this function)
Load. C: 1065: Error: effectmt? Undeclared (first use in this function)
Load. C: 1148: Error: policysql_type_float? Undeclared (first use in this function)
Load. C: 1205: Error: policysql? Undeclared (first use in this function)
Load. C: In function implements rror?
Load. C: 1242: Error: expected declaration specifiers before policysql_stmt?
Load. C: 1248: Error: policysql? Undeclared (first use in this function)
Make: *** [load. O] Error 1
[Root @ slave01 SRC] #

[Root @ slave01 SRC] # export c_include_path =/usr/local/MySQL/include/
[Root @ slave01 SRC] # Make
CC-w-O2-g-I. 'mysql _ config -- include '-C load. c
CC-w-O2-g-I. 'mysql _ config -- include '-C support. c
CC load. O support. O 'mysql _ config -- libs_r'-LRT-o ../tpcc_load
/Usr/bin/ld: cannot find-lmysqlclient_r
Collect2: LD returned 1 exit status
Make: *** [../tpcc_load] Error 1
[Root @ slave01 SRC] # export LD_LIBRARY_PATH =/usr/local/MySQL/lib
[Root @ slave01 SRC] # Make
CC load. O support. O 'mysql _ config -- libs_r'-LRT-o ../tpcc_load
/Usr/bin/ld: cannot find-lmysqlclient_r
Collect2: LD returned 1 exit status
Make: *** [../tpcc_load] Error 1
[Root @ slave01 SRC] #

After setting the environmental variables, an error message is also reported, indicating that the related mysqlclinet is not found. You need to set these three variables to complete the process: for example:

1. the header file of MySQL cannot be found.
Solution: Export c_include_path = $ mysql_home/include
2. The mysql_config program cannot be found.
Solution: Export Path = $ mysql_home/bin: $ path
3. the MySQL database cannot be found during running.
Solution: Export LD_LIBRARY_PATH = $ mysql_home/lib

Then create the database name in the database, and execute the relevant createsql, as shown below:

[Root @ slave01 SRC] # export c_include_path =/usr/local/MySQL/include
[Root @ slave01 SRC] # export Path =/usr/local/MySQL/bin: $ path
[Root @ slave01 SRC] # export LD_LIBRARY_PATH =/usr/local/MySQL/lib
[Root @ slave01 SRC] # Make
CC load. O support. O 'mysql _ config -- libs_r'-LRT-o ../tpcc_load
CC-w-O2-g-I. 'mysql _ config -- include '-C main. c
CC-w-O2-g-I. 'mysql _ config -- include '-C spt_proc.c
CC-w-O2-g-I. 'mysql _ config -- include '-C driver. c
CC-w-O2-g-I. 'mysql _ config -- include '-C sequence. c
CC-w-O2-g-I. 'mysql _ config -- include '-C rthist. c
CC-w-O2-g-I. 'mysql _ config -- include '-C neword. c
CC-w-O2-g-I. 'mysql _ config -- include '-C payment. c
CC-w-O2-g-I. 'mysql _ config -- include '-C ordstat. c
CC-w-O2-g-I. 'mysql _ config -- include '-C delivery. c
CC-w-O2-g-I. 'mysql _ config -- include '-C slev. c
CC main. O spt_proc.o driver. O support. O sequence. O rthist. O neword. O payment. O ordstat. o delivery. O slev. O 'mysql _ config -- libs_r'-LRT-o .. /tpcc_start
[Root @ slave01 SRC] # CD ..
[Root @ slave01 tpcc-mysql] # ls
Add_fkey_idx. SQL create_table. SQL load. Sh schema2 SRC tpcc_start
Count. SQL drop_cons. SQL readme scripts tpcc_load
[Root @ slave01 tpcc-mysql] # MySQL tpc300 <create_table. SQL
Error 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: No)
[Root @ slave01 tpcc-mysql] # mysql-uroot-proot tpc300 <create_table. SQL
Error 1049 (42000): Unknown database 'tpc300'
[Root @ slave01 tpcc-mysql] # mysql-uroot-proot tpcc300 <create_table. SQL
[Root @ slave01 tpcc-mysql] # ls
Add_fkey_idx. SQL create_table. SQL load. Sh schema2 SRC tpcc_start
Count. SQL drop_cons. SQL readme scripts tpcc_load

After the test is passed, use the tool. For example:

[Root @ slave01 tpcc-mysql] #./tpcc_load 192.168.0.42 tpcc300 Root 300
*************************************
* ** ### Easy ### TPC-C Data Loader ***
*************************************
<Parameters>
[Server]: 192.168.0.42
[Port]: 3306
[Dbname]: tpcc300
[User]: Root
[Pass]: Root
[Warehouse]: 300
Tpcc data load started...
Loading item
........................................ .......... 5000
........................................ .......... 10000
........................................ .......... 15000
........................................ .......... 20000
........................................ .......... 25000
........................................ .......... 30000
........................................ .......... 35000
........................................ .......... 40000
........................................ .......... 45000
........................................ .......... 50000
........................................ .......... 55000
........................................ .......... 60000
........................................ .......... 65000
........................................ .......... 70000
........................................ .......... 75000
........................................ .......... 80000
........................................ .......... 85000
........................................ .......... 90000
........................................ .......... 95000
........................................ .......... 100000
Item done.
Loading warehouse
Loading stock WID = 1
........................................ .......... 5000
........................................ .......... 10000
........................................ .......... 15000
........................................ .......... 20000
........................................ .......... 25000
........................................ .......... 30000
........................................ .......... 35000
........................................ .......... 40000
........................................ .......... 45000
........................................ .......... 50000
........................................ .......... 55000
........................................ .......... 60000
........................................ .......... 65000
........................................ .......... 70000
........................................ .......... 75000
........................................ .......... 80000
........................................ .......... 85000
........................................ .......... 90000
........................................ .......... 95000
........................................ .......... 100000
Stock done.
Loading District
Loading stock WID = 2
........................................ .......... 5000
........................................ .......... 10000
........................................ .......... 15000
........................................ .......... 20000
........................................ .......... 25000
........................................ .......... 30000
........................................ .......... 35000
........................................ .......... 40000
........................................ .......... 45000
........................................ .......... 50000
........................................ .......... 55000
........................................ .......... 60000
........................................ .......... 65000
........................................ .......... 70000
........................................ .......... 75000
........................................ .......... 80000
........................................ .......... 85000
........................................ .......... 90000
........................................ .......... 95000
........................................ .......... 100000
Stock done.
Loading District
Loading stock WID = 3
........................................ .......... 5000
........................................ .......... 10000
........................................ .......... 15000
........................................ .......... 20000
........................................ .......... 25000
........................................ .......... 30000
........................................ .......... 35000
........................................ .......... 40000
........................................ .......... 45000
........................................ .......... 50000
........................................ .......... 55000
........................................ .......... 60000
........................................ .......... 65000
........................................ .......... 70000
........................................ .......... 75000
........................................ .......... 80000
........................................ .......... 85000
........................................ .......... 90000
........................................ .......... 95000
........................................ .......... 100000
Stock done.
Loading District
Loading stock WID = 4

[Root @ slave01 tpcc-mysql] #./tpcc_start 192.168.0.42-D tpcc100-uroot-proot 100 16 600 1200
***************************************
* ** ### Easy ### TPC-C load generator ***
***************************************
Option D with value 'tpcc100'
Option u with value 'root'
Option P with value 'root'
Non-option argv-elements: 192.168.0.42 100 16 600 1200
<Parameters>
[Server]:
[Port]: 3306
[Dbname]: tpcc100
[User]: Root
[Pass]: Root
[Warehouse]: 1
[Connection]: 10
[Rampup]: 10 (sec .)
[Measure]: 20 (sec .)

Ramp-up time. (10 sec .)

Measuring start.

10,179 (0): 1.817 | 2.092, 174 (0): 0.445 | 0.565, 17 (0): 0.223 | 0.387, 18 (0): 1.783 | 1.800, 17 (0) 4.857 | 4.857
20,180 (0): 1.746 | 2.045, 187 (0): 0.427 | 0.454, 19 (0): 0.200 | 0.253, 17 (0): 1.715 | 1.763, 18 (0) 4.276 | 4.952

Stopping threads ..........

<Raw results>
[0] SC: 359 LT: 0 RT: 0 FL: 0
[1] SC: 361 LT: 0 RT: 0 FL: 0
[2] SC: 36 LT: 0 RT: 0 FL: 0
[3] SC: 35 LT: 0 RT: 0 FL: 0
[4] SC: 35 LT: 0 RT: 0 FL: 0
In 20 sec.

<Raw results2 (sum ver.)>
[0] SC: 359 LT: 0 RT: 0 FL: 0
[1] SC: 361 LT: 0 RT: 0 FL: 0
[2] SC: 36 LT: 0 RT: 0 FL: 0
[3] SC: 35 LT: 0 RT: 0 FL: 0
[4] SC: 35 LT: 0 RT: 0 FL: 0

<Constraint check> (all must be [OK])
[Transaction percentage]
Payment: 43.70% (> = 43.0%) [OK]
Order-status: 4.36% (> = 4.0%) [OK]
Delivery: 4.24% (>=4.0%) [OK]
Stock-level: 4.24% (>=4.0%) [OK]
[Response time (at least 90% passed)]
New-order: 100.00% [OK]
Payment: 100.00% [OK]
Order-status: 100.00% [OK]
Delivery: 100.00% [OK]
Stock-level: 100.00% [OK]

<Tpmc>
1077.000 tpmc
[Root @ slave01 tpcc-mysql] #

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.