|
[root@amb01 ~]# cd /usr/local/src
[root@amb01 src]# yum install -y git
[root@amb01 src]# git clone https://github.com/Percona-Lab/tpcc-mysql.git
Initialized empty Git repository in /usr/local/src/tpcc-mysql/.git/
remote: Counting objects: 392, done.
Receiving objects: 100% (392/392), 202.87 KiB | 70 KiB/s, done.
remote: Total 392 (delta 0), reused 0 (delta 0), pack-reused 392
Resolving deltas: 100% (216/216), done.
[root@amb01 src]# cd tpcc-mysql/src
[root@amb01 src]# make
[root@amb01 src]# cd ..
[root@amb01 tpcc-mysql]# ll
total 280
-rw-r--r-- 1 root root 1621 Mar 12 01:47 add_fkey_idx.sql
-rw-r--r-- 1 root root 317 Mar 12 01:47 count.sql
-rw-r--r-- 1 root root 3105 Mar 12 01:47 create_table.sql
-rw-r--r-- 1 root root 194 Mar 12 01:47 Dockerfile
-rw-r--r-- 1 root root 763 Mar 12 01:47 drop_cons.sql
-rw-r--r-- 1 root root 1079 Mar 12 01:47 load_multi_schema.sh
-rw-r--r-- 1 root root 573 Mar 12 01:47 load.sh
-rw-r--r-- 1 root root 2302 Mar 12 01:47 README.md
drwxr-xr-x 2 root root 4096 Mar 12 01:47 schema2
drwxr-xr-x 5 root root 4096 Mar 12 01:47 scripts
drwxr-xr-x 2 root root 4096 Mar 12 01:47 src
-rwxr-xr-x 1 root root 68304 Mar 12 01:47 tpcc_load
-rwxr-xr-x 1 root root 171350 Mar 12 01:47 tpcc_start
[root@amb01 tpcc-mysql]# mysql -uroot -pabcd.1234
mysql> create database tpcc1000;
Query OK, 1 row affected (0.05 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| tpcc1000 |
+--------------------+
4 rows in set (0.00 sec)
mysql> grant all on tpcc1000.* to 'tpcc'@'%' identified by 'tpcc';
Query OK, 0 rows affected (0.04 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> select user,host,password from mysql.user;
+------+-----------+-------------------------------------------+
| user | host | password |
+------+-----------+-------------------------------------------+
| root | localhost | *8E329B15E3C0FF9DDF7597B748CCE9473593BF60 |
| root | 127.0.0.1 | *8E329B15E3C0FF9DDF7597B748CCE9473593BF60 |
| root | ::1 | *8E329B15E3C0FF9DDF7597B748CCE9473593BF60 |
| tpcc | % | *D2B995B159B5840C27690FC435C6ACEE7B9E1348 |
+------+-----------+-------------------------------------------+
4 rows in set (0.00 sec)
[root@amb01 tpcc-mysql]# mysql -uroot -p tpcc1000 < create_table.sql
[root@amb01 tpcc-mysql]# ./tpcc_load -h 192.168.1.201 -d tpcc1000 -u tpcc -p "tpcc" -w 10
Loading Orders for D=1, W= 10
.......... 1000
.......... 2000
.......... 3000
Orders Done.
......
Loading Orders for D=10, W= 10
.......... 1000
.......... 2000
.......... 3000
Orders Done.
...DATA LOADING COMPLETED SUCCESSFULLY.
[root@amb01 tpcc-mysql]# mysql -uroot -p tpcc1000 < add_fkey_idx.sql
[root@amb01 tpcc-mysql]#./tpcc_start -h 192.168.1.201 -P 3306 -d tpcc1000 -u tpcc -p "tpcc" -w 10 -c 5 -l 120
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value '192.168.1.201'
option P with value '3306'
option d with value 'tpcc1000'
option u with value 'tpcc'
option p with value 'tpcc'
option w with value '10'
option c with value '5'
option l with value '120'
[server]: 192.168.1.201
[port]: 3306
[DBname]: tpcc1000
[user]: tpcc
[pass]: tpcc
[warehouse]: 10
[connection]: 5
[rampup]: 10 (sec.)
[measure]: 120 (sec.)
RAMP-UP TIME.(10 sec.)
MEASURING START.
10, trx: 12, 95%: 3165.301, 99%: 3207.267, max_rt: 3206.893, 13|1010.971, 2|416.537, 1|4364.939, 2|8494.064
20, trx: 19, 95%: 3196.723, 99%: 3493.940, max_rt: 3494.238, 21|1268.676, 2|62.891, 2|4298.500, 1|6421.528
30, trx: 18, 95%: 1977.211, 99%: 2383.986, max_rt: 2384.258, 14|1624.832, 1|24.328, 2|3244.716, 3|7988.705
40, trx: 20, 95%: 1891.528, 99%: 2076.076, max_rt: 2076.318, 23|1178.977, 3|1383.674, 2|2348.884, 0|0.000
50, trx: 17, 95%: 2460.843, 99%: 2480.813, max_rt: 2480.890, 16|1366.876, 1|225.186, 1|3128.689, 3|9977.782
60, trx: 15, 95%: 1744.666, 99%: 1957.190, max_rt: 1957.151, 14|1129.822, 2|395.175, 2|3647.191, 2|12215.742
70, trx: 19, 95%: 2366.921, 99%: 4109.378, max_rt: 4109.376, 19|1547.989, 1|264.096, 2|5346.821, 1|8192.001
80, trx: 16, 95%: 2156.519, 99%: 2945.878, max_rt: 2946.298, 16|1784.607, 2|223.824, 1|3092.542, 3|9156.268
90, trx: 19, 95%: 2271.818, 99%: 2957.364, max_rt: 2957.742, 18|818.307, 2|630.973, 2|4997.217, 0|0.000
100, trx: 13, 95%: 2308.839, 99%: 3074.715, max_rt: 3074.606, 15|1268.598, 1|736.042, 1|5498.861, 2|10595.128
110, trx: 13, 95%: 2747.416, 99%: 3357.571, max_rt: 3357.443, 9|2315.481, 1|521.829, 2|6028.633, 1|9532.556
120, trx: 15, 95%: 2482.298, 99%: 3226.525, max_rt: 3226.206, 16|1343.299, 2|81.345, 2|6154.702, 2|9403.878
STOPPING THREADS.....
[0] sc:0 lt:196 rt:0 fl:0 avg_rt: 1537.2 (5)
[1] sc:0 lt:194 rt:0 fl:0 avg_rt: 522.2 (5)
[2] sc:0 lt:20 rt:0 fl:0 avg_rt: 309.9 (5)
[3] sc:0 lt:20 rt:0 fl:0 avg_rt: 3981.5 (80)
[4] sc:0 lt:20 rt:0 fl:0 avg_rt: 8190.4 (20)
in 120 sec.
[0] sc:0 lt:196 rt:0 fl:0
[1] sc:0 lt:194 rt:0 fl:0
[2] sc:0 lt:20 rt:0 fl:0
[3] sc:0 lt:20 rt:0 fl:0
[4] sc:0 lt:20 rt:0 fl:0
(all must be [OK])
[transaction percentage]
Payment: 43.11% (>=43.0%) [OK]
Order-Status: 4.44% (>= 4.0%) [OK]
Delivery: 4.44% (>= 4.0%) [OK]
Stock-Level: 4.44% (>= 4.0%) [OK]
[response time (at least 90% passed)]
New-Order: 0.00% [NG] *
Payment: 0.00% [NG] *
Order-Status: 0.00% [NG] *
Delivery: 0.00% [NG] *
Stock-Level: 0.00% [NG] *
98.000 TpmC
|
|