ITPub博客

首页 > 数据库 > > GaussDB100之BenchmarkSQL应用

GaussDB100之BenchmarkSQL应用

作者:GaussDB_数据库 时间:2020-03-12 11:45:48 0 删除 编辑

1、工具benchmarksql-5.0.zip(https://sourceforge.net/projects/benchmarksql/)

 

2、执行方法

(1)解压工具包

1
unzip benchmarksql-5.0.zip

(2)编译

1
2
cd benchmarksql-5.0
ant

(3)拷贝数据库JDBC驱动至工具的lib路径

(4)添加配置文件

1
2
3
cd run
 
vi props.zenith

将以下内容拷贝到新增文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
db=oracle
 
driver=com.huawei.gauss.jdbc.ZenithDriver
 
conn=jdbc:zenith:@127.0.0.1:1888
 
user=tester
 
password=Database_123
 
 
warehouses=10
 
loadWorkers=10
 
 
terminals=10
 
//To run specified transactions per terminal- runMins must equal zero
 
runTxnsPerTerminal=0
 
//To run for specified minutes- runTxnsPerTerminal must equal zero
 
runMins=5
 
//Number of total transactions per minute
 
limitTxnsPerMin=0
 
 
//Set to true to run in 4.x compatible mode. Set to false to use the
 
//entire configured database evenly.
 
terminalWarehouseFixed=true
 
 
//The following five values must add up to 100
 
newOrderWeight=45
 
paymentWeight=43
 
orderStatusWeight=4
 
deliveryWeight=4
 
stockLevelWeight=4
 
 
// Directory name to create for collecting detailed result data.
 
// Comment this out to suppress.
 
resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
 
osCollectorScript=./misc/os_collector_linux.py
 
osCollectorInterval=1
 
//osCollectorSSHAddr=user@dbhost
 
//osCollectorDevices=net_eth0 blk_sda

(5)安装数据库

1
2
3
4
5
6
7
8
9
groupadd dbgrp
 
useradd -g dbgrp -d /home/gaussdba -m -s /bin/bash gaussdba
 
tar -zxvf Gauss100-OLTP-V300R001C00-ZENGINE-REDHAT-64bit_release.tar.gz
 
cd /opt/software/gaussdb/GaussDB-100-V300R001C00SPC200B130/GAUSSDB100-V300R001C00-DATABASE-EULER20SP3-64bit
 
python install.py -U gaussdba:dbgrp -R /home/gaussdba/app -D /home/gaussdba/data -C  LSNR_ADDR=127.0.0.1 -C LSNR_PORT=1888

(6)创建普通用户

1
2
3
su - gaussdbazsql sys/Changeme_123@127.0.0.1:1888 -q -c "CREATE USER tester IDENTIFIED BY Database_123;"
 
zsql sys/Changeme_123@127.0.0.1:1888 -q -c "GRANT DBA TO tester;"

(7)导入数据

1
./runDatabaseBuild.sh props.zenith

(8)执行业务

1
./runBenchmark.sh props.zenith

(9)清理数据

1
./runDatabaseDestroy.sh props.zenith

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3165639/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2020-01-06

  • 博文量
    2907
  • 访问量
    19196