暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片
使用BenchmarkSQL压测openGauss 数据库测试.pdf
297
17页
7次
2022-11-21
5墨值下载
一、环境准备
1.1、安装依赖包
1.2、安装JDK
1.3、安装R语言
[root@opengauss-node1 ~]# yum install gcc glibc-headers gcc-c++ gcc-gfortran
readline-devel libXt-devel pcre-devel libcurl libcurl-devel -y
[root@opengauss-node1 ~]# yum install ncurses ncurses-devel autoconf automake
zlib zlib-devel bzip2 bzip2-devel xz-devel ant -y
1
2
3
[root@opengauss-node1 ~]# mkdir -p /opt/module
[root@opengauss-node1 ~]# tar -zxvf jdk-8u321-linux-x64.tar.gz -C
/opt/module
-- 配置JAVA_HOME环境变量
[root@opengauss-node1 ~]# vim /etc/profile
-- 添加如下内容
export JAVA_HOME=/opt/module/jdk1.8.0_321
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$CLASSPATH
-- 生效配置
[root@opengauss-node1 ~]# source /etc/profile
-- 验证并查看版本
[root@opengauss-node1 ~]# java -version
openjdk version "1.8.0_352"
OpenJDK Runtime Environment (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM (build 25.352-b08, mixed mode)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@opengauss-node1 ~]# wget https://mirror.bjtu.edu.cn/cran/src/base/R-
3/R-3.6.3.tar.gz
[root@opengauss-node1 ~]# tar -zxvf R-3.6.3.tar.gz
[root@opengauss-node1 ~]# cd R-3.6.3
-- 编译
[root@opengauss-node1 R-3.6.3]# ./configure
-- 安装
[root@opengauss-node1 R-3.6.3]# make && make install
-- 验证并查看版本
[root@opengauss-node1 ~]# R --version
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
shlei6067
1.4、编译安装htop
1.5、安装benchmarksql
1.6、安装并替换JDBC驱动
https://www.gnu.org/licenses/.18
[root@opengauss-node1 ~]# wget https://github.com/htop-
dev/htop/releases/download/3.2.0/htop-3.2.0.tar.xz
[root@opengauss-node1 ~]# tar -zxvf htop-3.2.0.tar.gz
[root@opengauss-node1 ~]# cd htop-3.2.0
[root@opengauss-node1 htop-3.2.0]# ./autogen.sh
[root@opengauss-node1 htop-3.2.0]# ./configure
[root@opengauss-node1 htop-3.2.0]# make && make install
-- 验证并查看版本
[root@opengauss-node1 ~]# htop --version
htop 3.2.0
1
2
3
4
5
6
7
8
9
[root@opengauss-node1 ~]# wget
https://udomain.dl.sourceforge.net/project/benchmarksql/benchmarksql-5.0.zip
[root@opengauss-node1 ~]# unzip benchmarksql-5.0.zip
[root@opengauss-node1 ~]# ls -l benchmarksql-5.0
total 36
-rwxr-xr-x 1 root root 1130 May 262016 build.xml
drwxr-xr-x 3 root root 4096 May 262016 doc
-rwxr-xr-x 1 root root 6376 May 262016 HOW-TO-RUN.txt
drwxr-xr-x 5 root root 4096 May 262016 lib
-rwxr-xr-x 1 root root 5318 May 262016 README.md
drwxr-xr-x 7 root root 4096 May 262016 run
drwxr-xr-x 6 root root 4096 May 262016 src
1
2
3
4
5
6
7
8
9
10
11
-- 下载对应版本jdbc驱动
[root@opengauss-node1 ~]# wget https://opengauss.obs.cn-south-
1.myhuaweicloud.com/3.1.0/x86/openGauss-3.1.0-JDBC.tar.gz
-- 解压jdbc驱动
[root@opengauss-node1 ~]# tar -zxvf openGauss-3.1.0-JDBC.tar.gz
postgresql.jar
opengauss-jdbc-3.1.0.jar
README_cn.md
README_en.md
[root@opengauss-node1 ~]# mv /root/benchmarksql-5.0/lib/postgres/postgresql-
9.3-1102.jdbc41.jar /root/benchmarksql-5.0/lib/postgres/postgresql-9.3-
1102.jdbc41.jar_bak
[root@opengauss-node1 ~]# cp /root/postgresql.jar /root/benchmarksql-
5.0/lib/postgres/
[root@opengauss-node1 ~]# ls -lrt /root/benchmarksql-5.0/lib/postgres/
total 1408
-rw-r--r-- 1 root root 592322 May 262016 postgresql-9.3-
1102.jdbc41.jar_bak
-rw-r--r-- 1 root root 847123 Nov 21 09:31 postgresql.jar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
shlei6067
1.7、进行ant编译benchmarksql
1.8、配置benchmarksql文件
[root@opengauss-node1 ~]# cd /root/benchmarksql-5.0/
[root@opengauss-node1 ~]# cd /root/benchmarksql-5.0/
[root@opengauss-node1 benchmarksql-5.0]# ant
Buildfile: /root/benchmarksql-5.0/build.xml
init:
 [mkdir] Created dir: /root/benchmarksql-5.0/build
compile:
 [javac] Compiling 11 source files to /root/benchmarksql-5.0/build
dist:
 [mkdir] Created dir: /root/benchmarksql-5.0/dist
  [jar] Building jar: /root/benchmarksql-5.0/dist/BenchmarkSQL-5.0.jar
BUILD SUCCESSFUL
Total time: 5 seconds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@opengauss-node1 ~]# cd /root/benchmarksql-5.0/run/
[root@opengauss-node1 run]# cp -p props.pg props.openGauss
[root@opengauss-node1 run]# vim props.pg props.openGauss
-- 设置如下内容
db=postgres
driver=org.postgresql.Driver
conn=jdbc:postgresql://192.168.17.136:26000/presdb?
prepareThreshold=1&batchMode=on&fetchsize=10
user=preuser
password=gauss@123
warehouses=01
loadWorkers=4
terminals=1
runTxnsPerTerminal=0
runMins=6
limitTxnsPerMin=0
terminalWarehouseFixed=false
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
osCollectorScript=./misc/os_collector_linux.py
osCollectorInterval=1
osCollectorSSHAddr=omm@192.168.17.136
osCollectorDevices=net_ens33 blk_sda
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
shlei6067
of 17
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。