I'm trying to run the MySQL DBT2 Benchmark Tool, I have unzipped the archive and run the following commands:
./configure --with-mysql
make
make install
mkdir /tmp/dbt
datagen -w 3 -d /tmp/dbt --mysql
scripts/mysql/mysql_load_db.sh --path /tmp/dbt --mysql-path /usr/bin/mysql
scripts/run_mysql.sh --connections 20 --time 300 --warehouses 3
Run Code Online (Sandbox Code Playgroud)
But got the following output:
...
Stage 3. Starting of the test. Duration of the test 300 sec
STARTING DRIVER COMMAND: /root/dbt2-0.37.50.3/src/driver -d 127.0.0.1 -l 300 -wmin 1 -wmax 3 -spread 1 -w 3 -sleep 300 -tpw 10 -outdir /root/output/14/driver -p 30000 -warmup 0 -cooldown 20 -intermediate_timer_resolution 0
Shutdown clients. Send TERM signal to 5154.
Shutdown driver. Send TERM signal to 5190.
Stage 4. Processing of results...
Response Time (s)
Transaction % Average : 90th % Total Rollbacks %
------------ ----- --------------------- ----------- --------------- -----
Delivery 0.00 N/A 0 0 100.00
New Order 0.00 N/A 0 0 100.00
Order Status 0.00 N/A 0 0 100.00
Payment 0.00 N/A 0 0 100.00
Stock Level 0.00 N/A 0 0 100.00
0.00 new-order transactions per minute (NOTPM)
0.0 minute duration
0 total unknown errors
0.00 rollback transactions
0 second(s) ramping up
scripts/run_mysql.sh: line 632: 5154 Killed nohup $CLIENT_COMMAND > $OUTPUT_DIR/client.out 2>&1
scripts/run_mysql.sh: line 632: 5190 Killed nohup $DRIVER_COMMAND > $OUTPUT_DIR/driver.out 2>&1
Test completed.
Run Code Online (Sandbox Code Playgroud)
During the execution, SHOW PROCESSLIST did show that 20 clients were connected, all sleeping.
Any idea why no transactions are executed?
我已完成以下操作来重现您从 dbt2 看到的输出。
安装 Centos6.4
通过 YUM 安装 MySQL 5.1.69
安装Innotop实时查看所有查询和打开的交易
像你一样跑板凳:
[root@centos-cef dbt2-0.37.50.3]# scripts/run_mysql.sh --connections 20 --terminals 5 --time 300 --warehouses 3 --verbose
Run Code Online (Sandbox Code Playgroud)
Innotop 只显示了 20 个活跃的客户,但没有打开的查询或交易
DBT2 提供了几个日志。在我用于测试的系统上,有一个主目录 /root/output,然后是每次执行的编号。
/root/output/N 其中 N 是执行编号。
在文件/root/output/3/client/error.log 中,我发现了以下信息
Tue Jul 30 16:57:23 2013
Microseconds : 998724
tid:-1511446784 mysql/dbc_payment.c:32
mysql reports SQL STMT: stmt ERROR: 1305 PROCEDURE dbt2.payment does not exist
Tue Jul 30 16:57:23 2013
Microseconds : 998753
tid:-1511446784 mysql/dbc_common.c:97
ROLLBACK INITIATED
Tue Jul 30 16:57:28 2013
Microseconds : 859693
tid:-1511713024 mysql/dbc_new_order.c:88
mysql reports: SQL: call new_order(2, 5, 984, 1, 9, 90056, 2, 8, 47872, 2, 3, 48592, 2, 7, 21925, 2, 7, 96574, 2, 5, 53239, 2, 8, 30640, 2, 4, 39619, 2, 10, 86015, 2, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @rc), ERROR: 1305 PROCEDURE dbt2.new_order does not exist
Tue Jul 30 16:57:28 2013
Microseconds : 859735
tid:-1511713024 mysql/dbc_common.c:97
ROLLBACK INITIATED
Run Code Online (Sandbox Code Playgroud)
我在整个日志中看到ROLLBACK INITIATED。我还看到某些存储过程未安装,例如dbt2.payment
因此,我进一步查看,发现必须运行另一个脚本才能在 dbt2 数据库中创建存储过程。
scripts/mysql/mysql_load_sp.sh --database dbt2 --client-path /usr/bin/
Run Code Online (Sandbox Code Playgroud)
这给出了以下输出:
Load SP: delivery
Load SP: new_order
Load SP: new_order_2
Load SP: order_status
Load SP: payment
Load SP: stock_level
Run Code Online (Sandbox Code Playgroud)
你跑了吗
scripts/mysql/mysql_load_sp.sh --database dbt2 --client-path /usr/bin
Run Code Online (Sandbox Code Playgroud)
在您的服务器上加载存储过程?
加载 DBT2 的存储过程后,我再次运行 DBT2,这次我确实在 Innotop 的输出中看到了事务
[RO] InnoDB Txns (? for help) localhost, 2h7m, InnoDB 1s :-), 765.68 QPS, 22/0/0 con/run/cac thds, 5.1.69
History Versions Undo Dirty Buf Used Bufs Txns MaxTxnTime LStrcts
6 102 0 0 1.56% 99.80% 21 00:00
ID User Host Txn Status Time Undo Query Text
217 root localhost COMMITTED 00:00 0 COMMIT
Run Code Online (Sandbox Code Playgroud)
我和你一样注意到,DBT2 的输出仍然到处都是 O,所以我将仓库的数量增加到 30。我的想法是没有足够的交易或活动来产生有用的结果
scripts/run_mysql.sh --connections 20 --time 300 --warehouses 30 --verbose
Stage 4. Processing of results...
Response Time (s)
Transaction % Average : 90th % Total Rollbacks %
------------ ----- --------------------- ----------- --------------- -----
Delivery 3.32 0.004 : 0.001 136 0 0.00
New Order 44.59 0.027 : 0.095 1826 1654 90.58
Order Status 4.20 0.002 : 0.001 172 0 0.00
Payment 42.86 0.007 : 0.014 1755 0 0.00
Stock Level 3.57 0.010 : 0.000 146 0 0.00
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,这次 DBT2 发回了适当的结果。
| 归档时间: |
|
| 查看次数: |
1506 次 |
| 最近记录: |