使用方法

1、配置JDK环境

JDK最好是1.5以上的版本

JAVA_HOME=/usr/java/jdk1.6.0_22

PATH=$PATH:$JAVA_HOME/bin

2.准备工作

把要测试的数据库的JDBC DRIVER放到./BenchmarkSQL-2.3.2/lib目录下

在run/目录下的 runSQL.sh 、  loadData.sh 、  runBenchmark.sh三个文件中加入要测试的数据库的JDBC DRIVER的位置,如下图所示:

3.测试步骤

(1)配置数据库的JDBC连接信息

[root@host3 run]#  cp oracle.properties  kdbnew.properties

[root@host3 run]#  vi kdbnew.properties

driver=com.inspur.jdbc.KdDriver

conn=jdbc:inspur:thin:@localhost:8629:kdb

user=sys

password=kdb

(2)创建初始表

[root@host3 run]#  ./runSQL.sh  kdbnew.properties  sqlTableCreates

(3)添加初始数据

./loadData.sh  tibero.properties numWarehouses= 10

注意:等号与后面的数字之间一定要添加一个空格

10warehouse=1G

numWarehouse指的是仓库数(具体含义见上篇博文),默认为1,导入9张表的数据大小大概70多M,当 numWarehouse为10时,数据大小可以近似当作1GB数据。

(4)创建索引

./runSQL.sh kdbnew.properties sqlIndexCreates

(5)开始测试

./runBenchmark.sh  kdbnew.properties

在没有建索引的情况下不会产生tpmc值,太慢了

注意:在执行此命令之前,先用root用户执行xhost +,普通用户才可能显示图形界面

不要忘记设置图形界面的仓库数时要与第3步中设置的数量相符;此外,测试的结果报告除了显示在图形界面有显示以外,还在run/reports目录下有备份,随时可以查阅

如果图形化界面无法显示:

[root@host3 ~]# cd /etc/ssh

[root@host3 ssh]# ls

moduli      sshd_config       ssh_host_dsa_key.pub  ssh_host_key.pub  ssh_host_rsa_key.pub

ssh_config  ssh_host_dsa_key  ssh_host_key          ssh_host_rsa_key

[root@host3 ssh]# more sshd_config

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2

# but this is overridden so installations will only check .ssh/authorized_keys

AuthorizedKeysFile      .ssh/authorized_keys

#AllowAgentForwarding yes

#AllowTcpForwarding yes

#GatewayPorts no

X11Forwarding yes

#X11DisplayOffset 10

#X11UseLocalhost yes

#PrintMotd yes

#PrintLastLog yes

#TCPKeepAlive yes

#UseLogin no

UsePrivilegeSeparation sandbox          # Default for new installations.

# no default banner path

#Banner none

# override default of no subsystems

Subsystem       sftp    /usr/libexec/openssh/sftp-server

Control-Database:配置所要链接的数据库,默认会读取之前我们修改的配置文件,故此处不用动

Control-Terminals:配置终端数,仓库数,是否显示Debug信息,选择执行是分钟还是每终端事务数

Control-Weights:配置TPC-C测试中五种事务的比重(界面中只要配置4种),一般按默认比例测试即可

[BenchmarkSQL] Session #1 started!

[BenchmarkSQL] Creating 10 terminal(s) with 10 minute(s) of execution...

[BenchmarkSQL] Transaction Weights: 45% New-Order, 43% Payment, 4% Order-Status, 4% Delivery, 4% Stock-Level

[BenchmarkSQL] A complete report of the transactions will be saved to the file 'reports/BenchmarkSQL_session_20160129150651.txt'

[BenchmarkSQL] Creating database connection for Term-01...

[BenchmarkSQL] Creating database connection for Term-02...

[BenchmarkSQL] Creating database connection for Term-03...

[BenchmarkSQL] Creating database connection for Term-04...

[BenchmarkSQL] Creating database connection for Term-05...

[BenchmarkSQL] Creating database connection for Term-06...

[BenchmarkSQL] Creating database connection for Term-07...

[BenchmarkSQL] Creating database connection for Term-08...

[BenchmarkSQL] Creating database connection for Term-09...

[BenchmarkSQL] Creating database connection for Term-10...

[BenchmarkSQL] Created 10 terminal(s) successfully!

[BenchmarkSQL] Starting all terminals...

[BenchmarkSQL] All terminals started executing 2016-01-29 15:06:54

[BenchmarkSQL] The time limit has been reached.

[BenchmarkSQL] Signalling all terminals to stop...

[BenchmarkSQL] Waiting for all active transactions to end...

[BenchmarkSQL] All terminals finished executing 2016-01-29 15:16:54

[BenchmarkSQL] There were errors on this session!

[BenchmarkSQL] Session #1 finished!

run/reports下的后面的截取:

Measured tpmC   =60000*149708/600157

Session Start   2016-01-29 15:06:54

Session End     2016-01-29 15:16:54

Transaction Count       333804

注意:

1. 测试完后在界面下方会显示简要的测试结果,包括平均tpmC值(每分钟执行的事务数),当前tpmC值,内存使用情况等等;出结果以后尽量记录下来,因为之后如果乱点界面按钮的话,测试结果将会被重写(感觉是一个bug);

2.运行过程中如果想要修改终端数等参数,最好关闭GUI界面,重新运行runBenchmark.bat

tpmc值越高说明联机处理事务能力越强

导入数据后如果再用原来的导入数据的方法追加数据的话,数据会被覆盖

方法:可以新建其他用户,来使表空间增加数据

Bechmarksql的更多相关文章

随机推荐

  1. python---基础知识回顾(五)(python2.7和python3.5中的编码)

    Unicode 和 UTF-8 有何区别? python基础之字符编码 以上两篇看懂即可,那下面的就不需要看了 python标准数据类型 Bytes python--数据类型bytes Python ...

  2. HDU 5928 DP 凸包graham

    给出点集,和不大于L长的绳子,问能包裹住的最多点数. 考虑每个点都作为左下角的起点跑一遍极角序求凸包,求的过程中用DP记录当前以j为当前末端为结束的的最小长度,其中一维作为背包的是凸包内侧点的数量.也 ...

  3. python学习笔记3-函数的递归

    递归就是指自己函数的自我调用 #递归 #自己调用自己,函数的循环 def test1(): num = int(input('please enter a number:')) if num%2==0 ...

  4. 判别式模型 vs. 生成式模型

    1. 简介 生成式模型(generative model)会对\(x\)和\(y\)的联合分布\(p(x,y)\)进行建模,然后通过贝叶斯公式来求得\(p(y|x)\), 最后选取使得\(p(y|x) ...

  5. Kafka消息系统基础知识索引

    一些观念的修正 从 0.9 版本开始,Kafka 的标语已经从“一个高吞吐量,分布式的消息系统”改为"一个分布式流平台". Kafka不仅仅是一个队列,而且是一个存储,有超强的堆积 ...

  6. CodeForces - 1009B Minimum Ternary String

    You are given a ternary string (it is a string which consists only of characters '0', '1' and '2'). ...

  7. Linux下ssh的使用

    更多内容推荐微信公众号,欢迎关注: 摘抄自:https://www.cnblogs.com/kevingrace/p/6110842.html 对于linux运维工作者而言,使用ssh远程远程服务器是 ...

  8. 自然语言处理词向量模型-word2vec

    自然语言处理与深度学习: 语言模型: N-gram模型: N-Gram模型:在自然语言里有一个模型叫做n-gram,表示文字或语言中的n个连续的单词组成序列.在进行自然语言分析时,使用n-gram或者 ...

  9. Hibernate5笔记7--Hibernate缓存机制

    Hibernate缓存机制: 缓存范围: 应用程序中根据缓存的范围,可以将缓存分为三类:   (1)事务范围缓存(单Session,即一级缓存) 事务范围的缓存只能被当前事务访问,每个事务都有各自的缓 ...

  10. C++ 和 MFC的学习

    1. 在Windows应用程序设计中,既可以使用个C的基本数据类型,也可以使用Windows自定义的数据类型.但要注意,凡是Windows自定义的关键字都要大写. 2. 什么是句柄? 在Windows ...