TPCC-MySQL Benchmark Test

Source: Internet
Author: User
Tags percona

TPCC-MySQL Benchmark Test

TPCC-MySQL is a benchmark testing tool developed by Percona.

Download TPCC-MySQL

  1. Yum install bzr-y
  2. Bzr branch lp :~ Percona-dev/perconatools/tpcc-mysql

After the download, you can see the tpcc-mysql directory
Go to the src directory under this directory and execute make
In the upper-level directory, you can see that the tpcc_load tpcc_start command is available.

If the following error occurs, it may be MySQL installed in the source code, so its library is not in the default location.

  1. Error while loading shared libraries: libmysqlclient. so.18: cannot open shared object file: No such file or directory

Creating a soft link can solve this problem.

  1. Ln-s/home/lihuilin/mysql/lib/libmysqlclient. so.18/usr/lib64/libmysqlclient. so.18


Create a test database and use the following configuration for benchmarking:

  1. Create database tpcc;
  2. The MySQL configuration is as follows:
  3. Max_connections = 3000
  4. Innodb_buffer_pool_size = 1G
  5. Innodb_flush_log_at_trx_commit = 1
  6. Sync_binlog = 1
  7. Innodb_support_xa = 1

First load the data and execute the SQL statement used to create tables and constraints.

This tool simulates the warehouse system,
You can select the number of initialized warehouses. The larger the number, the larger the data volume.

Initialize 10 Repositories



Start the benchmark test. w indicates the number of warehouses, c indicates the number of concurrency, r indicates the push time, and l indicates the test run time.

  1. [Root @ mysql1 tpcc-mysql] #. /tpcc_start-h 127.0.0.1-u xx-p xx-d tpcc-w 10-c 200-r 10-l 60-I 10-f report-t trx
  2. 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





The output result of TPCC-MySQL includes five business logics, which constitute the entire transaction processing process of TPCC-MySQL testing. The details are as follows:
New-Order: New Order
Payment: Payment
Order-Status: Order Query
Delivery: Delivery
Stock-Level: Inventory

Predefined variables:
To clearly describe the following, first define some variables to facilitate the calculation and description below. The details are as follows:
Success = number of records successfully executed
Late = number of Execution Delay records
Pre_success = number of records successfully executed last time
Pre_late = number of records that failed the last execution

Based on the variables defined above, calculate the result of the corresponding field and describe the meaning of the corresponding field.
1. Successful transactions within the interval (including successful and delayed transactions): sl = success + late-pre_success-pre_late
2. Delayed transactions in time interval: l = late-pre_late
3. Average response time of the first 90% records (actually 99%) within the time interval: rt90
4. the maximum response time within the time interval: max_rt

View TPCC results

  1. New Order module payment Module
  2. Sl (l): rt90 | max_rt 1822 success (0 latency): 90% average response time 1.256 | maximum response time 4.119
  3. 10,187 9 (6): 4.024 | 9.398, 1822 (0): 1.256 | 4.119, 190 (0): 0.712 | 2.017, 186 (0): 5.227 | 5.929, 191 (0): 18.450 | 24.997

SC: success, lt: late, rt: retry, fl: failure

  1. <Raw Results>
  2. [0] SC: 8677 lt: 13 rt: 0 fl: 0 // New Order Number
  3. [1] SC: 8620 lt: 1 rt: 0 fl: 0 // payment service
  4. [2] SC: 872 lt: 0 rt: 0 fl: 0 // query service
  5. [3] SC: 878 lt: 0 rt: 0 fl: 0 // Shipping Service
  6. [4] SC: 871 lt: 0 rt: 0 fl: 0 // inventory Query
  7. In 60 sec.

 

  1. <Constraint Check> (all must be [OK])
  2. [Transaction percentage]
  3. Payment: 43.25% (> = 43.0%) [OK] // The Payment module accounts for 43.25% of the total business.
  4. Order-Status: 4.37% (> = 4.0%) [OK] // The Order module accounts for 4.37% of the total business
  5. Delivery: 4.40% (> = 4.0%) [OK] // The Shipping module accounts for 4.40% of the total business.
  6. Stock-Level: 4.37% (> = 4.0%) [OK] // The inventory module accounts for 4.37% of the total business.
  7. [Response time (at least 90% passed)] // whether the metric is met
  8. New-Order: 99.85% [OK]
  9. Payment: 99.99% [OK]
  10. Order-Status: 100.00% [OK]
  11. Delivery: 100.00% [OK]
  12. Stock-Level: 100.00% [OK]

// The indicators are as follows:
New-Order 5 ms
Payment 5 ms
Order-Status 5 ms
Delivery 80 ms
Stock-Level 20 ms

  1. <TpmC>
  2. 8690.000 TpmC // 8690 new orders per minute

Then modify the MySQL configuration and run the same test again.

  1. Innodb_buffer_pool_size = 512 m


We can see that the performance has decreased significantly.

 

-------------------------------------- Split line --------------------------------------

Benchmarking Tool-mysql

MySQL benchmarking tool TPCC-MySQL usage notes

MySQL 5.6.7-RC tpcc-mysql Benchmark Test Results

Install MySQL in Ubuntu 14.04

MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF

Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL

Build a MySQL Master/Slave service in Ubuntu 14.04

Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS

Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04

-------------------------------------- Split line --------------------------------------

This article permanently updates the link address:

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.