使用sysbench测试oracle

2021年5月8日 1220点热度 1人点赞 0条评论

之前用sysbench测试过oracle,发现sysbench新版本对oracle的支持真是太不友好,倒是0.5版本可以用,但是lua脚本又不丰富。今次网搜了下,发现osdba大侠有一套解决方案,特记录在此以供参考。
国内链接在此:
https://gitee.com/csudata/sysbench_bin
github在此:
https://github.com/osdba/sysbench_bin
https://github.com/osdba/sysbench_lua
把sysbench_ora和oltp.lua,common.lua搞下来,发现也是基于0.5版本的,而且对于19c的pdb支持有问题,算了先不折腾这个sysbench了吧。

以下是操作记录,留作参考。

准备数据
./sysbench_ora --test=./oltp.lua --db-driver=oracle --oltp-table-name=sysbench --oltp-table-size=100000 --oltp-tables-count=8 --oracle-db=pdb1 --oracle-user=liking --oracle-password=liking --max-time=60 --max-requests=10000000 --num-threads=2 --report-interval=1 prepare

压测
./sysbench_ora --test=./oltp.lua --db-driver=oracle --oltp-table-name=sysbench --oltp-table-size=100000 --oltp-tables-count=8 --oracle-db=pdb1 --oracle-user=liking --oracle-password=liking --max-time=60 --max-requests=10000000 --num-threads=10 --report-interval=1 run

清理数据
./sysbench_ora --test=./oltp.lua --db-driver=oracle --oltp-table-name=sysbench --oltp-table-size=100000 --oltp-tables-count=8 --oracle-db=pdb1 --oracle-user=liking --oracle-password=liking --max-time=60 --max-requests=10000000 --num-threads=2 --report-interval=1 cleanup

[oracle@rac1:0 ~/sysbench]$ ./sysbench_ora --test=./oltp.lua --db-driver=oracle --oltp-table-name=sysbench --oltp-table-size=100000 --oltp-tables-count=8 --oracle-db=pdb1 --oracle-user=liking --oracle-password=liking --max-time=60 --max-requests=10000000 --num-threads=2 --report-interval=1 prepare
sysbench 0.5:  multi-threaded system evaluation benchmark

FATAL: OCIServerAttach failed in drv_oracle.c:311
ALERT: Error - ORA-12154: TNS:could not resolve the connect identifier specified

FATAL: failed to execute function `prepare': ./common.lua:128: Failed to connect to the database

liking

这个人很懒,什么都没留下

文章评论