文件目录 cd /etc/yum.repos.d/iozone_smallfile/iozone3_429/src/current #这个文件自己建的 iozone_smallfile
-------------------------------------------------------------------------------------
解压iozone3_429.tar
tar xvf iozone3_429.tar #解压
cd iozone3_429/src/current
1)[[email protected]%ancunkj current]# make
注释:1.service iptables stop 2. gluster volume status 3. gluster peer status
----------------------------------------------------------------------------------------------
2)[[email protected]%ancunkj current]# make linux-AMD64
这个步骤会生成一个 iozone 的文件
--------------------------------------------------------------------------
3)[[email protected]%ancunkj current]# cp iozone /usr/local/bin # 拷贝到这个目录下 cp /usr/local/bin
-----------------------------------------------------------------------------------
4)得到有效数据 创建mkdir dht-iozone
[[email protected]%ancunkj current]# iozone -w -c -e -i 0 -+n -r 64k -s 1g -t 8 -F /mnt/dht-iozone/f{0,1,2,3,4,5,6,7,}.ioz
Each process writes a 1048576 kByte file in 64 kByte records
Children see throughput for 8 initial writers = 106134.47 kB/sec
Parent sees throughput for 8 initial writers = 100011.67 kB/sec
Min throughput per process = 12636.07 kB/sec
Max throughput per process = 13979.25 kB/sec
Avg throughput per process = 13266.81 kB/sec
Min xfer = 947584.00 kB
iozone test complete.
[[email protected]%ancunkj current]#
-----------------------------------------------------------------------------------------------
执行命令 创建 mkdir dht-iozone-client
[[email protected]%ancunkj current]# iozone -w -c -e -i 0 -+n -r 64k -s 1g -t 8 -F /mnt/dht-iozone-client/f{0,1,2,3,4,5,6,7,}.ioz
Each process writes a 1048576 kByte file in 64 kByte records
Children see throughput for 8 initial writers = 105563.73 kB/sec
Parent sees throughput for 8 initial writers = 98941.44 kB/sec
Min throughput per process = 12299.78 kB/sec
Max throughput per process = 13963.33 kB/sec
Avg throughput per process = 13195.47 kB/sec
Min xfer = 923584.00 kB
iozone test complete.
[[email protected]%ancunkj current]#
---------------------------------------------------------------------------------------------------------------------------
以上两个步骤,测试出来的性能,就相当于 一个client 并发8个thread
---------------------------------------------------------------------------------------------------------------------------
i——测试类型,0 =写,1 =阅读,2 =随机读/写 。
t——数量的线程并发多少子流程将发行I / O请求 。
[[email protected]%ancunkj current]# iozone -w -c -e -i 0 -+n -r 64k -s 1g -t 8 -F /mnt/dht-iozone-client/f0.ioz
/mnt/dht-iozone-client/f1.ioz /mnt/dht-iozone-client/f2.ioz /mnt/dht-iozone-client/f3.ioz
/mnt/dht-iozone-client/f4.ioz /mnt/dht-iozone-client/f5.ioz /mnt/dht-iozone-client/f6.ioz /mnt/dht-iozone-client/f7.ioz
Each process writes a 1048576 kByte file in 64 kByte records
Children see throughput for 8 initial writers = 97479.45 kB/sec
Parent sees throughput for 8 initial writers = 95655.19 kB/sec
Min throughput per process = 12028.28 kB/sec
Max throughput per process = 12423.91 kB/sec
Avg throughput per process = 12184.93 kB/sec
Min xfer = 1016640.00 kB
iozone test complete.
-----------------------------------------------------------------------------------------------------------------------------------
=====================================================================================
-----------------------------------------------------------------------------
iozone 测试 ec8-2
-----------------------------------------------------------------------------
iozone -w -c -e -i 0 -+n -r 64k -s 1g -t 8 -F /mnt/glusterfs/f{0,1,2,3,4,5,6,7,8}.ioz
iozone -w -c -e -i 0 -+n -r 128k -s 1g -t 9 -F /mnt/glusterfs/f{0,1,2,3,4,5,6,7,8,9}.ioz
1线程
iozone -w -c -e -i 0 -+n -r 256k -s 1g -t 1 -F /mnt/ec82-hf1-client/f{mn1}.ioz # file size =256k
2线程
4线程
8线程
16线程
iozone -w -c -e -i 0 -+n -r 128k -s 1g -t 1 -F /mnt/glusterfs/f{mn1}.ioz 一个线程会出现什么问题?
iozone -w -c -e -i 1 -+n -r 128k -s 1g -t 1 -F /mnt/glusterfs/f{mn1}.ioz
iozone -w -c -e -i 2 -+n -r 128k -s 1g -t 1 -F /mnt/glusterfs/f{mn1}.ioz
iozone -b client1 -w -c -e -i 0 -+n -r 128k -s 1g -t 9 -F /mnt/dht-client-new/f{0,1,2,3,4,5,6,7,8,9}.ioz
-----------------------------------------------------------------------------------------------
[[email protected]%ancunkj glusterfs-3.6.1]# service iptables stop #这个比较注意
-----------------------------------------------------------------------------------------------
for i in seq 0 9; do ssh vn$i "service iptables stop"; done #停止一下
cn0-6采用ec4-3模式 操作?
一、集群
[[email protected]%ancunkj /]# gluster peer probe cn0
gluster peer probe cn1
gluster peer probe cn2
gluster peer probe cn3
gluster peer probe cn4
gluster peer probe cn5
gluster peer probe cn6
[[email protected]%ancunkj /]# gluster peer status #看一下
二、 volume
[[email protected]%ancunkj /]# gluster volume create vol-server strip 6 cn0:/mnt/vol-server1 cn1:/mnt/vol-server1 cn2:/mnt/vol-server1 cn3:/mnt/vol-server1 cn4:/mnt/vol-server1
cn5:/mnt/vol-server1 cn6:/mnt/vol-server1 force
三) mount
[[email protected]%ancunkj mnt]# mount -t glusterfs mn0/mnt/strip-client/
四
1)ec搭建
[[email protected]%ancunkj mnt]# gluster volume create ec4-3 disperse 5 redundancy 3
cn0:/mnt/ec4-3-server cn1:/mnt/ec4-3-server cn2:/mnt/ec4-3-server cn3:/mnt/ec4-3-server cn4:/mnt/ec4-3-server cn5:/mnt/ec4-3-server cn6:/mnt/ec4-3-server
cn7:/mnt/ec4-3-server cn8:/mnt/ec4-3-server cn9:/mnt/ec4-3-server force
2)启动 ec4-3模式
[[email protected]%ancunkj mnt]# gluster volume start ec4-3
3) mn1上 创建 ec-client文件
[[email protected]%ancunkj mnt]# mkdir ec-client
4)挂载
[[email protected]%ancunkj mnt]# mount -t glusterfs cn0:/mnt/ec4-3 mn0:/mnt/ec-client
iozone -w -c -e -i 1 -+n -r 128k -s 1g -t 1 -F /mnt/glusterfs/f{mn1}.ioz
iozone -w -c -e -i 1 -+n -r 128k -s 1g -t 2 -F /mnt/glusterfs/f{mn1}.ioz
iozone -w -c -e -i 1 -+n -r 128k -s 1g -t 4 -F /mnt/glusterfs/f{mn1}.ioz
iozone -w -c -e -i 1 -+n -r 128k -s 1g -t 8 -F /mnt/glusterfs/f{mn1}.ioz
iozone -w -c -e -i 1 -+n -r 128k -s 1g -t 16 -F /mnt/glusterfs/f{mn1}.ioz
========================================================================================
执行清理
echo 1 > /proc/sys/vm/drop_caches
[[email protected]%ancunkj mnt]# mkdir dht-iozone-client
./run.sh dht-new1 "vn2 vn3" /mnt/dht-server-new1 "vn2 vn3" /mnt/dht-client-new1 128K
./run.sh dht-new1 "cn2" /mnt/dht-server-1 "cn0 cn1" /mnt/dht-client-1 128K
./smallfile.sh dht-new1 "cn2" /mnt/dht-server-1 "cn0 cn1" /mnt/dht-client-1 2
文件的位置要清楚
[[email protected]%ancunkj ] cd /mnt/lk/ iozone-scripts-lk / stop-and-delete-vol
[[email protected]%ancunkj /]# cd /usr/local/
[[email protected]%ancunkj /]cd /etc/yum.repos.d/iozone_smallfile
usr/local/bin/smallfile
./smallfile.sh: line 87: ./stop-and-delete-vol: No such file or directory
scp -r ./stop-and-delete-vol cn2:/etc/yum.repos.d/iozone_smallfile/smallfile-master
[[email protected]%ancunkj bin]# yum install expect
查看一下nfs的状态
[[email protected]%ancunkj mnt]# service nfs status
[[email protected]%ancunkj mnt]# service nfs restart
/vol2 192.168.1.0/24(rw,insecure,sync,no_root_squash)
/etc/exports的设置
然后执行exportfs -ar
客户端应该就可以mount了
已测试通过
必须要用0/24这种形式
--------------------------------------------------------------------------------------------------------------------------