Tpcc-mysql Application Testing

Source: Internet
Author: User
Tags benchmark types of tables

Tpcc-mysql MySQL implementation based on TPCC protocol

TPCC Introduction:

TPC-C is an on-line transaction processing BENCHMARK,TPC-C simulates a complete computing environment where a population o F users executes transactions against a database. The benchmark is centered around the principal activities (transactions) of a order-entry environment. These transactions include entering and delivering orders, recording payments, checking the status of orders, and Monitori Ng the level of the stock at the warehouses. While the benchmark portrays the activity of a wholesale supplier, tpc-c are not limited to the activity of any particular Business segment, but, rather represents any industry that must manage, sell, or distribute a product or service.

Tpc-c involves a mix of five concurrent transactions of different types and complexity either executed on-line or queued F or deferred execution. The database is comprised of nine types of tables with a wide range of record and population sizes. Tpc-c is measured in transactions per minute (TPMC).

The structure is as follows:

The result value TPMC is the number of transactions per minute, the General warehouse is set to 40-100, the CPU is bound,400-1000 to test the IO bound,40 the following, regardless of the transaction, the lock competition situation is not too easy to happen.

Local Environment:

Cpu:intel (R) Xeon (r) CPU X3430 @ 2.40GHz

mem:16g

Hdd:sata 500G

1. Installation:

BZR Branch Lp:~percona-dev/perconatools/tpcc-mysql (need to install BZR first)

Next is the compilation, CD Tpcc-mysql direct make after the OK, will be in the current directory generated tpcc_load, tpcc_start two running programs, mainly using these two programs

2. Introduction of using Method:

1. Build binaries   * CD SCR; make   (You should has mysql_config available in $PATH) 2. Load Data   * CREATE DATABASE     mysqladmin Create tpcc1000   * Create tables     mysql tpcc1000 < Create_ Table.sql   * Create indexes and FK (this step can do after loading data)     MySQL tpcc1000 < add_fkey_idx.sql   * Populate data     -Simple step       tpcc_load 127.0.0.1:33000 tpcc1000 root ""                 |hostname:port| | dbname| |user| |password| | warehouses|       Ref. tpcc_load--help for all options     -load data in parallel        check load.sh SCRIPT3. Start Benchmark   *./tp cc_start-h127.0.0.1-p33000-dtpcc1000-uroot-w1000-c32-r10-l10800                  |hostname| |port| |dbname| |user| | warehouses| | connections| | Warmup time| | BENCHMARK time|   

Next, generate the test data:

#./tpcc_load 127.0.0.1:3307 tpcc1000 Root "modular" 1000 (depending on the number of warehouses in the test, the runtime will be longer)

To 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 Warmup_time-l running_time-i report_interval-f report_file-t trx_file

-W Warehouse Quantity
-c Number of concurrent connections
-R pre-test warmup time, pre-test warm-up time
-L test Duration
-I generate report interval length
-F generated report file name

Run the command as follows:

#./tpcc_start-h127.0.0.1-p3307-dtpcc1000-uroot-pmodular-w1000-c32-r10-l10800

Operation Result:

[Email protected] tpcc-mysql]# more Benchmark.log
***************************************
# # #easy # # TPC-C Load Generator * * *
***************************************
Option h with value ' 127.0.0.1 '
Option P with value ' 3307 '
Option d with value ' tpcc1000 '
Option U with value ' root '
Option p with value ' modular '
Option W with value ' 1000 '
Option C with value ' 32 '
Option r with value ' 10 '
Option L with value ' 10800 '
<Parameters>
[Server]: 127.0.0.1
[Port]: 3307
[DBname]: tpcc1000
[User]: Root
[Pass]: Modular
[Warehouse]: 1000
[Connection]: 32
[Rampup]: Ten (sec.)
[Measure]: 10800 (sec.)

Ramp-up time. (sec.)

Measuring START.

10, 7 (0): 1.766|1.806, 12 (0): 0.593|0.608, 1 (0): 0.263|0.350, 1 (0): 0.000|3.034, 1 (0): 0.000|9.013
20, 11 (0): 3.350|3.740, 10 (0): 0.546|0.615, 2 (0): 0.209|0.266, 1 (0): 0.000|3.533, 1 (0): 0.000|8.559
30, 10 (0): 3.436|3.700, 19 (0): 0.563|0.566, 1 (0): 0.000|0.310, 0 (0): 0.000|0.000, 1 (0): 0.000|8.306
40, 9 (0): 3.260|3.530, 6 (0): 0.493|0.608, 1 (0): 0.000|0.317, 1 (0): 0.000|3.060, 2 (0): 7.629|9.541
50, 17 (0): 2.897|2.999, 16 (0): 0.564|0.596, 1 (0): 0.000|0.293, 1 (0): 0.000|3.475, 1 (0): 0.000|8.859
60, 10 (0): 3.104|3.228, 9 (0): 0.526|0.582, 1 (0): 0.000|0.316, 1 (0): 0.000|3.360, 0 (0): 0.000|0.000
70, 11 (0): 2.762|2.808, 12 (0): 0.555|0.558, 1 (0): 0.000|0.268, 1 (0): 0.000|3.528, 2 (0): 7.387|9.906
80, 13 (0): 3.198|3.629, 11 (0): 0.558|0.559, 2 (0): 0.268|0.317, 0 (0): 0.000|0.000, 1 (0): 0.000|8.610
90, 17 (0): 3.025|3.133, 15 (0): 0.543|0.568, 1 (0): 0.000|0.267, 1 (0): 0.000|3.314, 0 (0): 0.000|0.000
100, 5 (0): 2.502|2.696, 10 (0): 0.460|0.497, 1 (0): 0.000|0.275, 1 (0): 0.000|3.484, 3 (0): 8.376|8.442
110, 17 (0): 2.722|3.080, 14 (0): 0.579|0.581, 1 (0): 0.000|0.303, 1 (0): 0.000|3.523, 0 (0): 0.000|0.000
120, 7 (0): 3.137|3.217, 8 (0): 0.514|0.516, 2 (0): 0.285|0.305, 2 (0): 3.085|3.598, 2 (0): 8.044|8.239
130, 19 (0): 2.918|3.080, 16 (0): 0.505|0.553, 1 (0): 0.000|0.226, 2 (0): 3.341|3.453, 1 (0): 0.000|8.897
140, 4 (0): 1.582|1.721, 8 (0): 0.515|0.540, 1 (0): 0.000|0.223, 1 (0): 0.000|3.445, 2 (0): 8.408|9.736
150, 17 (0): 2.977|3.155, 12 (0): 0.571|0.579, 1 (0): 0.000|0.246, 0 (0): 0.000|0.000, 1 (0): 0.000|8.718
160, 13 (0): 3.016|3.411, 17 (0): 0.587|0.599, 1 (0): 0.000|0.220, 2 (0): 3.017|3.100, 1 (0): 0.000|8.659
。。。。。。。。。。。。。。。。。。。。

10800, 27 (0): 2.830|2.832, 25 (0): 0.516|0.556, 2 (0): 0.205|0.255, 3 (0): 2.903|3.353, 3 (0): 9.740|9.754

Stopping THREADS ......... ...............

<raw results>
[0] sc:23728 lt:0 rt:0 fl:0
[1] sc:23727 lt:0 rt:0 fl:0
[2] sc:2374 lt:0 rt:0 fl:0
[3] sc:2372 lt:0 rt:0 fl:0
[4] sc:2365 lt:0 rt:0 fl:0
In 10800 sec.

<raw Results2 (Sum ver.) >
[0] sc:23736 lt:0 rt:0 fl:0
[1] sc:23738 lt:0 rt:0 fl:0
[2] sc:2374 lt:0 rt:0 fl:0
[3] sc:2372 lt:0 rt:0 fl:0
[4] sc:2365 lt:0 rt:0 fl:0

<constraint check> (all must be [OK])
[Transaction percentage]
payment:43.48% (>=43.0%) [OK]
order-status:4.35% (>= 4%) [OK]
delivery:4.35% (>= 4%) [OK]
stock-level:4.33% (>= 4%) [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>
131.822 TPMC

Tpcc-mysql Application Testing

Related Article

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.