对CephFS进行性能测试
cephfs 内核: 3.10.0-327.el7.x86_64
内存:256g
操作系统版本:centos 7.2.1511
OSD_count=3
每个osd容量5.5T,共16.5T
Pool 副本数:3
stripe_unit=4M
stripe_count=1
object_size=4M
一 . iozone测试
1. iozone安装
wget http://www.iozone.org/src/current/iozone3_486.tar
tar -xvf iozone3_486.tar
cd iozone3_486/ src/current
make linux-AMD64
./iozone –h #iozone帮助
2. iozone对cephfs进行测试
./iozone -a -+u -i 0 -i 1 -i 2-b -s 10g -r 4k -f /mnt/ceph/iozone_10g –I –t 1 /home/iozoneResult/iozone_4k.xls
reclen | write | rewrite | read | reread | randread | randwrite |
---|---|---|---|---|---|---|
4 | 30753 | 31410 | 5272869 | 5443172 | 3618749 | 966 |
16 | 72285 | 72721 | 6268883 | 6596477 | 5517920 | 3531 |
256 | 72602 | 70883 | 5034489 | 4922802 | 4858299 | 64989 |
512 | 73317 | 72703 | 5714257 | 6001413 | 5934733 | 68708 |
1M | 72234 | 72068 | 5608456 | 5879902 | 5843498 | 70545 |
2M | 73423 | 71797 | 5381314 | 5731047 | 5697624 | 71568 |
4M | 72349 | 72655 | 5380933 | 5707175 | 5661692 | 74486 |
3. iozone测试结果参数解读
对于-i选项具体含义
Write: 测试向一个新文件写入的性能。当一个新文件被写入时,不仅仅是那些文件中的数据需要被存储,还包括那些用于定位数据存储在存储介质的具体位置的额外信息。这些额外信息被称作“元数据”。它包括目录信息,所分配的空间和一些与该文件有关但又并非该文件所含数据的其他数据。拜这些额外信息所赐,Write的性能通常会比Re-write的性能低。
Re-write: 测试向一个已存在的文件写入的性能。当一个已存在的文件被写入时,所需工作量较少,因为此时元数据已经存在。Re-write的性能通常比Write的性能高。
Read: 测试读一个已存在的文件的性能。
Re-Read: 测试读一个最近读过的文件的性能。Re-Read性能会高些,因为操作系统通常会缓存最近读过的文件数据。这个缓存可以被用于读以提高性能。
Random Read: 测试读一个文件中的随机偏移量的性能。许多因素可能影响这种情况下的系统性能,例如:操作系统缓存的大小,磁盘数量,寻道延迟和其他。
Random Write: 测试写一个文件中的随机偏移量的性能。同样,许多因素可能影响这种情况下的系统性能,例如:操作系统缓存的大小,磁盘数量,寻道延迟和其他。
二 . Fio测试
1. fio安装
git clone git://git.kernel.dk/fio.git
ls
cd fio
ls
./configure
make
make install
2. fio测试
io引擎psync,iodepth使用默认的1
2.1 bs维度
fio -filename=/mnt/ceph/fio -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=64k -size=10G -numjobs=1 -runtime=600 -group_reporting -name=mytest -output home/result/Result_64k_read1.log
固定线程数为1,以bs为变量测试读写带宽,以下bw单位为M/s
Fio BS | Write | RandomWrite | Read | RandomRead |
---|---|---|---|---|
4 KB | 3.29 | 1.1 | 8.36 | 0.44 |
8KB | 6.9 | 1.37 | 11.9 | 1037 |
16 KB | 9.88 | 2.4 | 17.1 | 1946 |
32 KB | 15.3 | 4.13 | 21.6 | 2619 |
64 KB | 30.1 | 30.6 | 29.5 | 21.8 |
128 KB | 37.0 | 32.9 | 38.7 | 24.2 |
256 KB | 39.0 | 38.0 | 33.3 | 20.0 |
512 KB | 39.8 | 38.2 | 34.6 | 24.1 |
1M | 40.1 | 39.2 | 34.1 | 26.9 |
2M | 40.7 | 39.2 | 33.4 | 35.6 |
4M | 40.1 | 39.7 | 32.9 | 39.3 |
8M | 39.9 | 38.8 | 33.2 | 40.7 |
2.2 thread维度
固定bs为512k,测试线程数为1、2、4、8、16等情况下的读写带宽,以下bw单位为M/s
Numjobs | Write | Random Write | Read | Random Read |
---|---|---|---|---|
1 | 37.9 | 39.6 | 18.2 | 22.4 |
2 | 40.5 | 39.1 | 36.8 | 32.8 |
4 | 40.1 | 39.2 | 65.9 | 47.4 |
8 | 39.9 | 39.7 | 121 | 58.7 |
16 | 39.4 | 39.5 | 188 | 65.1 |
32 | 40.6 | 38.9 | 331 | 66.4 |
64 | 39.3 | 39.1 | 438 | 49.7 |
numobjs | Write | RandomWrite | Read | RandomRead |
---|---|---|---|---|
1 | 39.7MB/s | 41.5MB/s | 19.1MB/s | 23.5MB/s |
2 | 42.5MB/s | 40.9MB/s | 38.6MB/s | 34.4MB/s |
8 | 41.9MB/s | 41.6MB/s | 127MB/s | 61.6MB/s |
16 | 41.4MB/s | 41.5MB/s | 226MB/s | 63.3MB/s |