用root 用户安装:

export CC=cc

export CXX=c++

export CFLAGS="-m64 -I /home/app/oracle/product/12.1.0.2/db_1/rdbms/public"

export CXXFLAGS="$CFLAGS"

export ORACLE_HOME=/home/app/oracle/product/12.1.0.2/db_1

export LD_LIBRARY_PATH=/home/app/oracle/product/12.1.0.2/db_1/lib

yum install m4 autoconf automake libtool -y

./configure --prefix=/usr/local/sysbench --with-oracle --libdir=/home/app/oracle/product/12.1.0.2/db_1/lib --without-mysql

make ORA_LIBS=/home/app/oracle/product/12.1.0.2/db_1/lib/libclntsh.so

make install

echo "export PATH=$PATH:/usr/local/sysbench/bin">>/etc/profile

source /etc/profile

一般语法

prepare :用于文件IO和数据库OLTP测试的数据准备阶段。

run :性能测试阶段

cleanup :移除测试过程中产生的数据

sysbench --test=oltp --oracle-user=lianguser --oracle-password=oracle --oracle-db=LGJDB --db-driver=oracle --oltp-table-size=1000000 --oltp-num-tables=10 prepare

sysbench --test=oltp --oracle-user=lianguser --oracle-password=oracle --oracle-db=LGJDB --db-driver=oracle cleanup

sysbench --num-threads=12 --max-requests=10 --test=oltp --oracle-user=lianguser --oracle-password=oracle --oracle-db=LGJDB --db-driver=oracle --oltp-test-mode=complex --oltp-table-size=1000000 --oltp-num-tables=10 run

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐