1 GlusterFS扩展操作

1.1 节点卷同步
同一个卷所在节点的配置文件都相同(/var/lib/glusterd/vols/),丢失其中一个节点的文件还可以同步过来

# 命令格式
volume sync <HOSTNAME> [all|<VOLNAME>]# 模拟操作
[root@glusterfs-8-12 ~]# cd /var/lib/glusterd/vols
[root@glusterfs-8-12 vols]# ls
test-volume
[root@glusterfs-8-12 vols]# rm -rf test-volume/
[root@glusterfs-8-12 vols]# ls
[root@glusterfs-8-12 vols]# gluster volume sync server1 all
Sync volume may make data inaccessible while the sync is in progress. Do you want to continue? (y/n) y
volume sync: success
[root@glusterfs-8-12 vols]# ls
test-volume

1.2 卷的一些常用额外参数
格式:

gluster volume set <卷> <参数>
参数项目 说明 缺省值 合法值
auth.allow IP访问授权 *(allow all) Ip地址
auth.reject IP拒绝访问(默认全部允许) *(reject all) IP地址
cluster.min-free-disk 剩余磁盘空间阈值 10% 百分比
cluster.stripe-block-size 条带大小 128KB 字节
network.frame-timeout 请求等待时间 1800s 0-1800
network.ping-timeout 客户端等待时间 42s 0-42
nfs.disabled 关闭NFS服务 Off Off
performance.io-thread-count IO线程数 16 0-65
performance.cache-refresh-timeout 缓存校验周期 1s 0-61
performance.cache-size 读缓存大小 32MB 字节

1.3 复制卷数据不同步

[root@glusterfs-8-10 brick2]# gluster volume info test1-volumeVolume Name: test1-volume
Type: Replicate
Volume ID: fd79cf1b-5a7e-41b2-a773-34b854a7a67d
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: server1:/brick2/b1
Brick2: server2:/brick2/b1

2 性能测试

需要安装一些测试工具

yum install atop fio iperf -y

2.1 iperf 网络带宽性能测试
测试流程,首先在服务端起一个iperf服务,然后再在一个客户端起一个client,然后测试两个节点之间的网络传输性能,支持多并发测试
(1)一个进程测试

# 先起服务,服务端起来之后不用操作,只用于接收并显示性能测试数据结果
[root@glusterfs-8-10 ~]# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------# 客户端操作
[root@glusterfs-8-11 ~]# iperf -c server1
------------------------------------------------------------
Client connecting to server1, TCP port 5001
TCP window size: 19.3 KByte (default)
------------------------------------------------------------
[  3] local 10.0.8.11 port 33236 connected with 10.0.8.10 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  4.57 GBytes  3.93 Gbits/sec

(2)并发测试

[root@glusterfs-8-11 ~]# iperf -c server1 -P 4
------------------------------------------------------------
Client connecting to server1, TCP port 5001
TCP window size: 19.3 KByte (default)
------------------------------------------------------------
[  4] local 10.0.8.11 port 33240 connected with 10.0.8.10 port 5001
[  5] local 10.0.8.11 port 33242 connected with 10.0.8.10 port 5001
[  3] local 10.0.8.11 port 33238 connected with 10.0.8.10 port 5001
[  6] local 10.0.8.11 port 33244 connected with 10.0.8.10 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.08 GBytes   931 Mbits/sec
[  3]  0.0-10.0 sec  1.10 GBytes   942 Mbits/sec
[  6]  0.0-10.0 sec  1.13 GBytes   971 Mbits/sec
[  5]  0.0-10.0 sec  1.12 GBytes   965 Mbits/sec
[SUM]  0.0-10.0 sec  4.44 GBytes  3.81 Gbits/sec

2.2 dd 读取转换输出数据性能测试

[root@glusterfs-8-10 mnt]# dd if=/dev/zero of=dd.txt bs=1M count=1k
记录了1024+0 的读入
记录了1024+0 的写出
1073741824字节(1.1 GB)已复制,19.1915 秒,55.9 MB/秒
[root@glusterfs-8-10 mnt]# dd if=dd.txt of=/dev/null bs=1M count=1k
记录了1024+0 的读入
记录了1024+0 的写出
1073741824字节(1.1 GB)已复制,1.05382 秒,1.0 GB/秒

2.3 fio测试磁盘性能

# 客户端新建一个conf配置文件
cat >>/data/fio.conf<<EOF
[global]
ioengine=libaio
direct=1
thread=1
norandommap=1
randrepeat=0
filename=/data/fio.dat
size=100m
[rr]
stonewall
group_reporting
bs=4k
rw=randread
numjobs=8
iodepth=4
EOF# 测试
[root@glusterfs-8-13 ~]# fio fio.conf
rr: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=4
...
rr: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=4
fio-2.0.13
Starting 8 threads
rr: Laying out IO file(s) (1 file(s) / 100MB)
fio: pid=6289, err=9/file:ioengines.c:369, func=io commit, error=Bad file descriptorm:00s]rr: (groupid=0, jobs=8): err= 9 (file:ioengines.c:369, func=io commit, error=Bad file descriptor): pid=6288: Sat Oct 12 16:59:28 2019read : io=819260KB, bw=21275KB/s, iops=5318 , runt= 38508msecslat (usec): min=258 , max=30301 , avg=1498.86, stdev=1244.26clat (usec): min=1 , max=29783 , avg=4507.22, stdev=2094.79lat (usec): min=260 , max=34175 , avg=6007.03, stdev=2349.57clat percentiles (usec):|  1.00th=[ 2480],  5.00th=[ 2672], 10.00th=[ 2736], 20.00th=[ 2864],| 30.00th=[ 2960], 40.00th=[ 3216], 50.00th=[ 3632], 60.00th=[ 4192],| 70.00th=[ 5152], 80.00th=[ 6240], 90.00th=[ 7776], 95.00th=[ 8768],| 99.00th=[10560], 99.50th=[11328], 99.90th=[14656], 99.95th=[19328],| 99.99th=[24704]bw (KB/s)  : min= 2134, max= 2896, per=12.52%, avg=2663.22, stdev=128.49lat (usec) : 2=0.01%, 4=0.01%, 10=0.01%, 500=0.01%, 750=0.01%lat (usec) : 1000=0.01%lat (msec) : 2=0.01%, 4=56.58%, 10=41.67%, 20=1.69%, 50=0.04%cpu          : usr=0.00%, sys=0.00%, ctx=18446744073709333138, majf=18446744073709551576, minf=18446744073709449383IO depths    : 1=0.1%, 2=0.1%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%issued    : total=r=204818/w=0/d=0, short=r=0/w=0/d=0Run status group 0 (all jobs):READ: io=819260KB, aggrb=21275KB/s, minb=21275KB/s, maxb=21275KB/s, mint=38508msec, maxt=38508msec

GlusterFS扩展操作及性能测试工具相关推荐

  1. linux命令 iperf-网络性能测试工具

    iperf命令是一个网络性能测试工具.iperf可以测试TCP和UDP带宽质量.iperf可以测量最大TCP带宽,具有多种参数和UDP特性.iperf可以报告带宽,延迟抖动和数据包丢失.利用iperf ...

  2. 深入浅出开源性能测试工具 Locust (使用篇 1)

    在<[LocustPlus序]漫谈服务端性能测试>中,我对服务端性能测试的基础概念和性能测试工具的基本原理进行了介绍,并且重点推荐了Locust这一款开源性能测试工具.然而,当前在网络上针 ...

  3. apache性能测试工具ab使用详解

    网站性能压力测试是服务器网站性能调优过程中必不可缺少的一环.只有让服务器处在高压情况下,才能真正体现出软件.硬件等各种设置不当所暴露出的问题. 性能测试工具目前最常见的有以下几种:ab.http_lo ...

  4. python编写测试工具-python 写一个性能测试工具(一)

    国庆重新学习了一下go的gin高性能测试框架. 用JMeter来测试gin与flask接口的性能,差别很大. 为什么我自己不尝试写一个性能工具,性能工具的核心就是 并发 和 请求. 请求可以选择Pyt ...

  5. 史上最全的Web性能测试工具大全(下 )

    2019独角兽企业重金招聘Python工程师标准>>> 本文继续为大家介绍Web开发中常用的性能测试工具,如果你有其他性能测试产品推荐,欢迎交流! Opera Dragonfly O ...

  6. MySQL性能测试工具sysbench的安装和使用

    sysbench是一个开源的.模块化的.跨平台的多线程性能测试工具,可以用来进行CPU.内存.磁盘I/O.线程.数据库的性能测试.目前支持的数据库有MySQL.Oracle和PostgreSQL.当前 ...

  7. Web网站的性能测试工具

    随着Web 2.0技术的迅速发展,许多公司都开发了一些基于Web的网站服务,通常在设计开发Web应用系统的时候很难模拟出大量用户同时访问系统的实际情况,因此,当Web网站遇到访问高峰时,容易发生服务器 ...

  8. 如何ping端口_复刻smartbits的国产网络性能测试工具minismb-如何配置Ping报文

    复刻smartbits的国产网络性能测试工具minismb,是一款专门用于测试智能路由器,网络交换机的性能和稳定性的软硬件相结合的工具.可以通过此以太网测试工具测试任何ip网络设备的端口吞吐率,带宽, ...

  9. 网络性能测试工具iperf的使用与参数解析

    介绍   网络性能评估主要是监测网络带宽的使用率,将网络带宽利用最大化是保证网络性能的基础,但是由于网络设计不合理.网络存在安全漏洞等原因,都会导致网络带宽利用率不高.要找到网络带宽利用率不高的原因, ...

最新文章

  1. DNS域名服务器双master+ntp时间服务器双主+keepalived企业高可用方案 附脚本
  2. 怎么知道网站是用什么程序做的
  3. Linux下多线程查看工具(pstree、ps、pstack),linux命令之-pstree使用说明
  4. Fiddler抓包工具详解(一)(fiddler原理,HTTP请求构成)
  5. LeetCode 1452. 收藏清单(std::includes判断子集)
  6. ecshop彻底去版权把信息修改成自己的全教程
  7. 二级C语言程序设计备考方法
  8. 软件工程概论之登录页面
  9. Gridview创建行列 合并列、行类
  10. 用原生JS写PHP里的Ajax
  11. python能自学成功吗-python能够自学吗
  12. python大数据分析入门实例-记一次小机器的 Python 大数据分析
  13. 抖音无水印解析API
  14. python存钱挑战_案例(4):52周存钱法
  15. H264 码率控制原理
  16. 浏览器主页被劫持篡改为hao123或者别的网页解决方法
  17. 【PYG】常用和采坑总结
  18. 【OpenCV】- 分水岭算法
  19. Cesium 视频融合,边缘模糊
  20. npm audit fix命令使用

热门文章

  1. 2021-2027全球与中国多媒体教室投影仪市场现状及未来发展趋势
  2. 全球首个视觉导航物流机器人
  3. Java实现输出100-1000的水仙花数
  4. Redis系列(六)
  5. 耦合式无线充电系统设计记录_3
  6. NAACL'22 Findings | 社交媒体上的抱怨强度分析
  7. GPS实验二:GPS接收机的使用
  8. 论文写作-引言怎么写
  9. 数据库表数据如何去重
  10. Java jQuery_2