GBase 8a
安装配置
文章

Gbase 8a 安装前磁盘性能检查

发表于2025-02-22 19:02:2984次浏览2个评论

一、检查目的

Gbase 8a 属于MPP分布式集群,一般最少有3个服务器组成集群,多的有几十乃至几百个服务器,安装后要确保各个服务器节点磁盘IO性能一致,防止出现木桶效应;

节点名称

主机名

IP地址

节点1

node173

172.16.9.173

节点2

node174

172.16.9.174

节点3

node175

172.16.9.175

二、安装c3工具方便多个节点批量执行命令

1. 配置ssh互信

###173节点执行
ssh-keygen
ssh-keygen -t rsa -b 1024 -f /home/gbase/.ssh/id_rsa  -P "" -q
ssh-copy-id 172.16.9.173
ssh-copy-id 172.16.9.174
ssh-copy-id 172.16.9.175

2. 编写host配置文件

vim /etc/hosts
添加如下一行
172.16.9.173  node173

3. 编写c3配置文件

vim /etc/c3.conf
添加如下行

4. 安装c3工具

rpm -ivh c3-5.1.2-1.noarch.rpm --nodeps --force

5. 测试批量节点执行命令(cexec 并行,cexecs串行)

cexec all:  "date" > 1.log
cat 1.log

三、测试磁盘io性能

1. dd测试命令如下

mkdir -p /tmp/dd
cexecs all: 'dd oflag=direct if=/dev/zero of=/opt/1.dat bs=256K count=5120 ' &>/tmp/dd/dd_w_256.log;
cexecs all: 'dd iflag=direct if=/opt/1.dat of=/dev/null bs=256K count=5120 ' &>/tmp/dd/dd_r_256.log;
cexecs all: 'dd iflag=direct oflag=direct if=/opt/1.dat of=/opt/2.dat bs=256K count=5120 ' &>/tmp/dd/dd_rw_256.log;
cexecs all: 'dd oflag=direct if=/dev/zero of=/opt/1.dat bs=512K count=5120 ' &>/tmp/dd/dd_w_512.log;
cexecs all: 'dd iflag=direct if=/opt/1.dat of=/dev/null bs=512K count=5120 ' &>/tmp/dd/dd_r_512.log;
cexecs all: 'dd iflag=direct oflag=direct if=/opt/1.dat of=/opt/2.dat bs=512K count=5120 ' &>/tmp/dd/dd_rw_512.log;
cexecs all: 'dd oflag=direct if=/dev/zero of=/opt/1.dat bs=1M count=5120 ' &>/tmp/dd/dd_w_1024.log;
cexecs all: 'dd iflag=direct if=/opt/1.dat of=/dev/null bs=1M count=5120 ' &>/tmp/dd/dd_r_1024.log;
cexecs all: 'dd iflag=direct oflag=direct if=/opt/1.dat of=/opt/2.dat bs=1M count=5120 ' &>/tmp/dd/dd_rw_1024.log;
cexecs all: 'dd oflag=direct if=/dev/zero of=/opt/1.dat bs=2M count=5120 ' &>/tmp/dd/dd_w_2048.log;
cexecs all: 'dd iflag=direct if=/opt/1.dat of=/dev/null bs=2M count=5120 ' &>/tmp/dd/dd_r_2048.log;
cexecs all: 'dd iflag=direct oflag=direct if=/opt/1.dat of=/opt/2.dat bs=2M count=5120 ' &>/tmp/dd/dd_rw_2048.log;

2. fio测试命令如下

mkdir -p /tmp/fio
#随机读:
cexecs all: 'fio -filename=/opt/test_randread -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytes' >/tmp/fio/fio_random_read.log;
#顺序读:
cexecs all: 'fio -filename=/opt/test_randread -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest' >/tmp/fio/fio_sort_read.log;
#随机写:
cexecs all: 'fio -filename=/opt/test_randread -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest' >/tmp/fio/fio_random_write.log;
#顺序写:
cexecs all: 'fio -filename=/opt/test_randread -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest' >/tmp/fio/fio_sort_write.log;

两个测试命令完成后,各个日志文件,确保每个节点性能相差不大。

评论

登录后才可以发表评论
用户头像
levvel发表于 8个月前
听说评论可以拿积分,我试一下子
崔哥发表于 8个月前
雾窗寒对遥天暮,暮天遥对寒窗雾。花落正啼鸦,鸦啼正落花。袖罗垂影瘦,瘦影垂罗袖。风翦一丝红,红丝一翦风。