使用BenchMarkSQL测试openGauss
作者:李强
Email:liqiang3@sugon.com
版本:1.0 2020-07-14 初稿
BenchmarkSQL是对OLTP数据库主流测试标准TPC-C的开源实现。目前最新版本为V5.0,该版本自带支持Firebird,Oracle和PostgreSQL数据库,测试结果详细信息存储在CSV文件中,并可以将结果转换为HTML报告。
本手册将介绍,如何对BenchMarkSQL 5.0进行改造,使其可以测试openGauss。
1. openGauss配置
首先配置openGauss数据库,创建测试所需的用户、数据库,并完成远程连接配置。
1.1 数据库信息
以曙光openGauss测试环境为例。
- IP:192.168.5.1
- Port:26000
- DB_HOME:/opt/huawei/install/data/db1
1.2 创建新用户
创建远程连接用户sugon,并授予SYSADMIN管理员权限。
su - omm postgres=# CREATE USER sugon PASSWORD 'Sugon2020'; postgres=# ALTER USER sugon SYSADMIN; |
1.3 创建新数据库
新建表空间和数据库。
postgres=# create tablespace sugondb relative location 'sugondb'; postgres=# create database sugondb with tablespace=sugondb; |
1.4 配置远程连接
使用gs_guc添加客户端访问验证。本次测试BenchMarkSQL测试软件放在openGauss本机,故客户端IP与数据库服务器IP相同。
配置完成后,使用gsql进行访问验证。
gs_guc set -N all -I all -h "host sugondb sugon 192.168.5.1/32 sha256" gsql -h 192.168.5.1 -p 26000 -Usugon -W Sugon2020 -d sugondb |
2. BenchMarkSQL配置
&nb