search
HomeDatabaseMysql TutorialMySQL基准测试工具TPCC-MySQL使用笔记

TPCC是专门针对联机交易处理系统(OLTP系统)的规范,一般情况下我们也把这类系统称为业务处理系统。TPCC-mysql是有percona公司研

TPCC是专门针对联机交易处理系统(OLTP系统)的规范,一般情况下我们也把这类系统称为业务处理系统。TPCC-mysql是有percona公司研发,专门转对mysql的基准测试工具,模拟电商业务流程.但是tpcc-mysql的结果并未获得TPC组织的认证,仅作为一个参考数据。

 一、下载安装tpcc-mysql

1、安装bzr版本控制工具
#yum install bzr
 tips:如果没有找到安装包,,请下搜索下载rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm,安装以后再yum。

2、下载tpcc-mysql源码
#bzr branch lp:~percona-dev/perconatools/tpcc-mysql

3、安装
#cd tpcc-mysql/src/
#make

然后会在上层目录生成 tpcc_load tpcc_start两个二进制程序。

 二、准备测试

 1、创建测试表结构
mysql -uroot -proot -e 'create database tpcc'  //-u -p改成你自己mysql的用户名和密码
mysql -uroot -proot tpcc mysql -uroot -proot tpcc

 2、创建数据

 ./tpcc_load localhost tpcc root root 100 //最后的数字是代表几个仓库,仓库越大,数据量越大。耗费的时间越长,数据最好模拟你真实的数据量,或者至少大于你的buffer pool。

 3、开始测试
./tpcc_start: invalid option -- -
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
 # ./tpcc_start -hlocalhost -d tpcc -u root -p root -w 100 -c 8 -r 10 -l 20

 三、输出结果分析

***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value 'localhost'
option d with value 'tpcc'
option u with value 'root'
option p with value '2012mlnsh'
option w with value '100'
option c with value '8'
option r with value '120'
option l with value '1200'

    [server]: localhost
    [port]: 3306
    [DBname]: tpcc
      [user]: root
      [pass]: 2012mlnsh
  [warehouse]: 100
 [connection]: 8
    [rampup]: 120 (sec.)
    [measure]: 1200 (sec.)

RAMP-UP TIME.(120 sec.)

MEASURING START.

  10, 1187(0):1.682|2.175, 1187(0):0.336|0.473, 118(0):0.172|0.226, 118(0):1.864|2.122, 119(0):6.953|8.107
  20, 1303(0):1.641|1.877, 1306(0):0.333|0.400, 131(0):0.173|0.203, 130(0):1.895|2.252, 133(0):5.387|5.490
  30, 1471(0):1.677|2.123, 1472(0):0.333|0.394, 148(0):0.160|0.177, 148(0):1.801|2.102, 146(0):5.366|6.069
  40, 1418(0):1.657|2.050, 1415(0):0.338|0.465, 141(0):0.157|0.218, 142(0):1.788|2.140, 142(0):4.965|5.276
  50, 1620(0):1.644|1.937, 1619(0):0.332|0.444, 162(0):0.163|0.201, 161(0):1.934|2.158, 160(0):5.412|5.664
  60, 1702(0):1.735|2.143, 1705(0):0.355|0.420, 170(0):0.167|0.182, 172(0):1.827|2.169, 174(0):5.088|5.214
  70, 1751(0):1.623|2.035, 1748(0):0.343|0.464, 175(0):0.171|0.178, 174(0):1.787|1.798, 174(0):5.598|6.204
  80, 1675(0):1.771|1.999, 1675(0):0.356|0.399, 167(0):0.172|0.180, 167(0):1.828|2.041, 168(0):5.526|6.172
  90, 1805(0):1.723|2.036, 1807(0):0.357|0.458, 181(0):0.176|0.181, 180(0):1.767|2.008, 182(0):5.556|5.796
 100, 1787(0):1.703|2.026, 1784(0):0.359|0.431, 179(0):0.172|0.193, 179(0):1.856|2.027, 177(0):5.429|5.858
 110, 1948(0):1.790|2.087, 1952(0):0.353|0.485, 194(0):0.199|0.207, 195(0):2.057|2.092, 195(0):5.456|5.985
 120, 1981(0):1.710|1.956, 1979(0):0.355|0.407, 198(0):0.173|0.180, 198(0):1.968|2.052, 198(0):5.571|6.180
 130, 1885(0):1.785|2.092, 1884(0):0.365|0.467, 190(0):0.172|0.197, 189(0):2.027|2.096, 188(0):5.451|5.677
 140, 1942(0):1.761|2.035, 1948(0):0.356|0.490, 194(0):0.177|0.217, 194(0):2.081|2.188, 195(0):5.548|5.839
 150, 1992(0):1.742|2.099, 1989(0):0.347|0.380, 199(0):0.207|0.219, 199(0):1.924|2.018, 200(0):5.182|5.547
 160, 1974(0):1.733|2.133, 1977(0):0.352|0.413, 197(0):0.185|0.234, 198(0):2.072|2.156, 196(0):5.751|6.031
 170, 2115(0):1.798|2.085, 2109(0):0.353|0.422, 211(0):0.170|0.223, 210(0):1.939|2.051, 212(0):5.258|5.493
 180, 1840(0):1.791|2.092, 1840(0):0.349|0.455, 185(0):0.179|0.200, 185(0):1.840|1.908, 184(0):5.449|5.508
 190, 2002(0):1.813|2.046, 2000(0):0.356|0.407, 199(0):0.177|0.199, 199(0):2.124|2.178, 200(0):5.569|5.729
 200, 1778(0):1.774|2.185, 1780(0):0.353|0.394, 178(0):0.176|0.205, 179(0):2.036|2.063, 178(0):5.396|5.995
 210, 1943(0):1.738|2.165, 1942(0):0.357|0.450, 195(0):0.168|0.183, 193(0):1.950|2.108, 194(0):5.446|5.839
 220, 1954(0):1.730|2.073, 1958(0):0.353|0.400, 196(0):0.180|0.225, 197(0):1.957|1.973, 196(0):5.573|6.317
 230, 2058(0):1.789|1.930, 2055(0):0.339|0.443, 205(0):0.178|0.206, 205(0):1.918|2.141, 206(0):5.295|5.938
 240, 2106(0):1.786|2.065, 2109(0):0.350|0.414, 210(0):0.175|0.183, 210(0):1.978|2.156, 211(0):5.170|6.782
 250, 2245(0):1.771|2.059, 2242(0):0.346|0.411, 225(0):0.185|0.197, 226(0):1.941|2.070, 224(0):5.450|5.677
 260, 2062(0):1.744|2.150, 2059(0):0.357|0.426, 206(0):0.175|0.229, 205(0):1.949|2.147, 206(0):5.471|6.274
 270, 2026(0):1.739|2.099, 2025(0):0.343|0.389, 202(0):0.166|0.197, 202(0):1.913|2.075, 202(0):5.008|5.394
 280, 1958(0):1.759|2.075, 1950(0):0.356|0.460, 197(0):0.179|0.210, 198(0):1.966|2.043, 197(0):5.336|5.883
 290, 2039(0):1.671|2.043, 2052(0):0.354|0.412, 203(0):0.217|0.230, 204(0):1.890|1.933, 203(0):5.359|5.666
 300, 2158(0):1.824|2.093, 2156(0):0.357|0.429, 217(0):0.180|0.191, 214(0):1.961|2.105, 216(0):5.329|5.864
 310, 2076(0):1.822|2.089, 2081(0):0.356|0.515, 207(0):0.175|0.202, 210(0):2.036|2.148, 209(0):5.348|5.524
 320, 2356(0):1.814|2.081, 2353(0):0.351|0.440, 235(0):0.186|0.216, 235(0):1.988|2.092, 235(0):5.493|5.654
 330, 2326(0):1.803|2.074, 2324(0):0.363|0.418, 233(0):0.188|0.233, 230(0):1.958|2.243, 232(0):5.420|6.108
 340, 10(0):1.122|1.229, 8(0):0.237|0.250, 1(0):0.000|0.096, 0(0):0.000|0.000, 1(0):0.000|3.557
 350, 39(0):1.508|1.627, 40(0):0.321|0.337, 4(0):0.136|0.138, 6(0):1.680|1.800, 5(0):3.644|4.395
 360, 49(0):1.590|1.866, 50(0):0.334|0.335, 5(0):0.137|0.167, 4(0):1.592|1.660, 4(0):4.533|4.654
 370, 44(0):1.725|1.781, 44(0):0.325|0.330, 5(0):0.119|0.152, 6(0):1.475|1.888, 5(0):4.376|4.656
STOPPING THREADS........

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Reduce the use of MySQL memory in DockerReduce the use of MySQL memory in DockerMar 04, 2025 pm 03:52 PM

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

How to solve the problem of mysql cannot open shared libraryHow to solve the problem of mysql cannot open shared libraryMar 04, 2025 pm 04:01 PM

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Run MySQl in Linux (with/without podman container with phpmyadmin)Run MySQl in Linux (with/without podman container with phpmyadmin)Mar 04, 2025 pm 03:54 PM

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

What is SQLite? Comprehensive overviewWhat is SQLite? Comprehensive overviewMar 04, 2025 pm 03:55 PM

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Running multiple MySQL versions on MacOS: A step-by-step guideRunning multiple MySQL versions on MacOS: A step-by-step guideMar 04, 2025 pm 03:49 PM

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft