Tpcc-mysql installation, use, interpretation of results

Source: Internet
Author: User
Tags benchmark

Tpcc-mysql's business logic and several of its related tables function as follows:

New-order: New orders, mainly corresponding to New_orders table payment: Payment, the main corresponding orders, history table Order-status: Order status, mainly corresponding orders, Order_line table delivery: Shipping , mainly corresponds to the Order_line table Stock-level: Inventory, the main corresponding to the stock table other related tables: Customers: The main Customer table region: the main corresponding to the district table goods: the main corresponding Item table warehouse: The main corresponding to the warehouse table

second, compile and install
Compiling is very simple and requires just one make.

Cd/tmp/tpcc-mysql/srcmake if make does not have an error, the TPCC binary command line tool tpcc_load, Tpcc_start, is generated under/tmp/tpcc-mysql

  1. Build binaries

    • cd scr ; make(You should has mysql_config available in $PATH)
  2. Load data

    • Create Databasemysqladmin create tpcc1000
    • Create tablesmysql tpcc1000 < create_table.sql
    • Create indexes and FK (this step can is done after loading data)mysql tpcc1000 < add_fkey_idx.sql
    • Populate data
      • Simple step tpcc_load -h127.0.0.1 -d tpcc1000 -u root -p "" -w 1000 |hostname:port| |dbname| |user| |password| | warehouses| Ref. tpcc_load--help for all options
      • Load data in parallel check load.sh script
  3. Start benchmark

    • ./tpcc_start -h127.0.0.1 -P3306 -dtpcc1000 -uroot -w1000 -c32 -r10 -l10800
    • |hostname| |port| |dbname| |user| | warehouses| | connections| | Warmup time| | BENCHMARK time|
    • Ref. Tpcc_start--help for all options

three, TPCC before the test preparation
Initializing the test library environment

Cd/tmp/tpcc-mysqlmysqladmin Create Tpcc1000mysql-f tpcc1000 < Create_table.sql

Once the initialization is complete, you can start loading the test data.

Tpcc_load usage is as follows: Tpcc_load [Server] [db] [user] [pass] [warehouse] or Tpcc_load [Server] [db] [user] [pass] [warehouse] [part] [MIN_WH] [MAX_WH]

The warehouse option means the number of warehouses under the specified test library.

In real test scenarios, the number of warehouses is generally not recommended less than 100 , depending on the server hardware configuration, if it is equipped with an SSD or PCIe SSD this high-IOPS device, it is recommended that minimum of 1000 .

Execute the following command to begin filling in the test data:

cd/tmp/tpcc-mysql./tpcc_load localhost tpcc1000 tpcc_user "Tpcc_password" 1000

Here, it is important to note that TPCC will read the/var/lib/mysql/mysql.sock socket file by default.
Therefore, if your socket file is not in the corresponding path, you can make a soft connection, or a TCP/IP connection to the test server, for example:

Cd/tmp/tpcc-mysql./tpcc_load 1.2.3.4:3306 tpcc1000 tpcc_user "Tpcc_password" 1000

The length of the load test data depends on the number of warehouses, if the process is relatively long need to wait a little patience.

Iv. conducting TPCC testing
The Tpcc_start tool is used for TPCC pressure measurement with the following usage:

Tpcc_start-h server_host-p port-d database_name-u mysql_user-  p mysql_password-w warehouses-c connections-r War Mup_time-  l running_time-i report_interval-f report_file

A few options are explained slightly below

-W Specify number of warehouses-C specify number of concurrent connections-R specifies the time to warmup before starting the test, and after preheating, the test effect is better-l specifies the test duration-  ---Specifies the report file name generated when the report interval is generated

Now let's open up a test case:

tpcc_start-hlocalhost-d tpcc1000-u tpcc_user-p "Tpcc_password"-  w 1000-c 32-r 120-l 3600-  F tpcc_mysql_2014 0921.log >> Tpcc_casex_20140921.log 2>&1

That is: Simulation of 1000 warehouse size, 16 threads for testing, warm-up time of 60 seconds, the pressure test time is 1 hours.

In real test scenarios, it is recommended that the preheating time is not less than 5 minutes and the duration of continuous pressure measurement is not less than 30 minutes , otherwise the test data may not be of reference significance.

V. Interpretation of TPCC Test results:

Launch test:

./tpcc_start-h 1.2.3.4-p 3306-d tpcc10-u tpcc-p TPCC-  w 10-c 64-r 30-l +-  f Tpcclog_201409211538_64_thre ADS.log >> Tpcc_noaid_2_20140921_64.log 2>&1

The test result output is as follows:

--Some basic information of this round TPCC pressure measurement ****************************************** # # #easy # # # tpc-c Load Generator *********************** Option h with value ' 1.2.3.4 '--host option P with value ' 3306 '--port option D with value ' t  PCC10 '--database option U with value ' TPCC '--account option p with value ' TPCC '--Password option W with                 Value ' 10 '--Number of warehouses option C with value ' 64 '--Number of concurrent threads option R with value ' 30 ' --long option L with value ' 120 ' when data is preheated--time of the test with value ' tpcclog_20140921_64_threads.res '--Output report log file [Server]: 1.2.3.4 [port]: 3306 [DBname]: tpcc10 [user]: TPCC [pass]: TPCC [warehouse]: [Con] Nection]: [Rampup]: (sec.) [Measure]: (sec.) ramp-up time. (sec.) --Preheat end, start to test measuring start.--output voltage test every 10 seconds Data 10, 8376 (0): 2.744|3.211, 8374 (0): 0.523|1.626, 838 (0): 0.250|0.305, 837 (0 ): 3.241|3.518, 839 (0): 9.086|10.676 20, 8294 (0): 2.175|2.327, 8292 (0): 0.420|0.495, 829 (0): 0.206|0.243, 827 (0): 2.489|2.593, 827 (0): 7.214|7.646 ... 110, 8800 (0): 2.149|2.458, 8792 (0): 0.424|0.710, 879 (0): 0.207|0.244, 878 (0): 2.461|2.556, 878 (0): 7.042|7.341 120, 8819 (0 ): 2.147|2.327, 8820 (0): 0.424|0.568, 882 (0): 0.208|0.237, 881 (0): 2.483|2.561, 883 (0): 7.025|7.405--comma-delimited, total 6 columns-first column, Nth 10 second-second column, total number of successful tests performed (total delay in execution of the test): 90% Transaction Response Time | Maximum response time for this round--third column, New Order business successful execution count (deferred execution count): 90% Transaction Response Time | The maximum response time for this round of testing-the fourth column, The result of the payment business, the next few meanings ibid--fifth column, the result of the delivery business, the meaning of the following several meanings ibid--sixth column, the result of the stock business, the meaning of the following several meanings ibid--end of stopping THREADS ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... .......--First rough results statistics [0] sc:100589 lt:0 rt:0 fl:0--New -order, New Order business Success (success, abbreviated SC) Number of times, delay (late, abbreviated LT) Number of times, retry (retry, abbreviated RT) Number of times, failure (failure, shorthand FL) Number of times [1] sc:100552 lt:0 rt:0 fl:0--  Payment, payment business statistics, other ibid. [2] sc:10059 lt:0 rt:0 fl:0--order-status, order status business statistics, other ibid. [3] sc:10057 lt:0 rt:0 fl:0--    Delivery, shipping business statistics, other ibid. [4] sc:10058 lt:0 rt:0 fl:0-Stock-level, Inventory business statistics, other than in the SEC. --second rough statistical results, other ibid. [0] sc:100590 Lt:0 rt:0 fl:0   [1] sc:100582 lt:0 rt:0 fl:0   [2] sc:10059 lt:0 rt:0 fl:0   [3] sc:10057 lt:0 rt:0 fl:0  [4] sc:10059 lt:0 rt:0 fl:0 (All must is [OK])--All business logic results below must be OK [transaction percentage] payment:43.47% (>=43.0%) [OK]--the number of payment successes (SC + LT) must be greater than 43%, otherwise the result is Ng, not OK order-status:4.35% (>= 4%) [OK]-order status, other ibid delivery:4.35% (>= 4%) [OK]--delivery, other ibid. stock-level:4.35% (>= 4%)              [OK]--stock, other ibid. [Response time (at least 90% passed)]--response duration indicator must exceed 90% pass only new-order:100.00% [OK]    --The following response time-consuming indicators all 100% through payment:100.00% [OK] order-status:100.00% [OK] delivery:100.00% [OK] stock-level:100.00% [OK] 50294.500 tpmc--tpmc result value

Some scripts in the script directory are mainly performance data collection and analysis, you can explore how to use

Tpcc-mysql installation, use, interpretation of results

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.