TPC-C

TPC-C的性能度量单位是tpmC,tpm是transaction per minute简写,C代表TPC的C基准测试。该值越大,代表事务处理的性能越高。

下载地址:

https://github.com/Percona-Lab/tpcc-mysql

(1)make编译:

[root@zstedu soft]# cd tpcc-mysql/
cd src && make

(2)创建数据库:

mysqladmin -h127.0.0.1 -uroot -p create tpcc1000

(3)创建表:

mysql -h127.0.0.1 -uroot -p tpcc1000 < create_table.sql

(4)create indexes and FK ( this step can be done after loading data) 

mysql -h127.0.0.1 -uroot -p tpcc1000 < add_fkey_idx.sql

(5)填充数据:

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

(6)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

 

Output

 

With the defined interval (-i option), the tool will produce the following output:

 

  10, trx: 12920, 95%: 9.483, 99%: 18.738, max_rt: 213.169, 12919|98.778, 1292|101.096, 1293|443.955, 1293|670.842
  20, trx: 12666, 95%: 7.074, 99%: 15.578, max_rt: 53.733, 12668|50.420, 1267|35.846, 1266|58.292, 1267|37.421
  30, trx: 13269, 95%: 6.806, 99%: 13.126, max_rt: 41.425, 13267|27.968, 1327|32.242, 1327|40.529, 1327|29.580
  40, trx: 12721, 95%: 7.265, 99%: 15.223, max_rt: 60.368, 12721|42.837, 1271|34.567, 1272|64.284, 1272|22.947
  50, trx: 12573, 95%: 7.185, 99%: 14.624, max_rt: 48.607, 12573|45.345, 1258|41.104, 1258|54.022, 1257|26.626

 

猜你喜欢

转载自www.cnblogs.com/chinaops/p/9279782.html