Dell/R730XD sas盘 raid0与JBOD性能比较

服务器配置

Dell/R730XD 2620V4*2  16G DDR4*4  300G SAS*2+6T SAS*12 

oracle linux 6.9

基础知识

RAID0

raid0组成方式:1块或多块磁盘组成,磁盘a写一部分数据,b写一部分,...,通过将数据分散到不同的磁盘,来提升速度,因此速度为单块磁盘的n(磁盘数)倍。

优点:性能提升,是单盘的n倍;

缺点:无安全冗余,一块坏,全完蛋。

配置单盘raid0的命令:

/opt/MegaRAID/MegaCli/MegaCli64 -PDlist -aALL | grep "ID"  | uniq | awk -F: '{print $2}' | awk '{print $1}'
Enclosure Device ID: 32
 
 
 
##对每块盘创建raid0,参数解释:
##cfgLdAdd  可创建raid0、156
##[Enclosure Device ID:磁盘slot]
##[WT|WB] raid写策略:write through(不写缓存)和write back(写缓存),sas盘随机写性能比较差,因此设置WB
##[NORA|RA|ADRA] raid读策略:no read ahead(默认)|read ahead | adpter read ahead
##[direct,cached]读缓存模式:默认direct,读一般不需要经过缓存
##[CachedBadBBU|NoCachedBadBBU]:bbu和write cache的关系,[bad bbu,write back变为write through|bad bbu,依然write back]
## a0 raid卡 adapterid
 
 
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:0] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:1] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:2] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:3] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:4] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:5] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:6] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:7] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:8] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:9] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:10] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgLdAdd -r0 [32:11] WB Direct -a0
 
##查看设备
/opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply –aALL  | grep -E "DISK GROUP|Slot Number"
 
[@s26.txyz.db.d ~]# fdisk -l | grep '/dev/sd'
Disk /dev/sda: 299.4 GB, 299439751168 bytes
/dev/sda1   *           1        2611    20971520   83  Linux
/dev/sda2            2611        5222    20971520   83  Linux
/dev/sda3            5222        7311    16777216   82  Linux swap / Solaris
/dev/sda4            7311       36405   233700352    5  Extended
/dev/sda5            7311        9922    20971520   83  Linux
/dev/sda6            9922       36405   212726784   83  Linux
Disk /dev/sdb: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdc: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdd: 6000.6 GB, 6000606183424 bytes
Disk /dev/sde: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdf: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdg: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdh: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdi: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdj: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdk: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdl: 6000.6 GB, 6000606183424 bytes
Disk /dev/sdm: 6000.6 GB, 6000606183424 bytes

JBOD

JBOD:如果说raid0是是一种横排组合,那JBOD就是一种纵向组合,尽管有n块盘,只能一块写满之后,写第二块;一种逻辑组合,损坏一块就会丢失一部分数据。

优点:损失一块磁盘,只丢一部分数据

缺点:写性能相当于单盘。

配置步骤:

 
 
##开启adapter0的JBOD
/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp EnableJBOD 1 -a0
 
##对32:0配置JBOD,可惜的是,无法设置一些raid卡参数
/opt/MegaRAID/MegaCli/MegaCli64 -PDMakeJBOD -physdrv[32:0]  -a0
 
##

性能测试

按上面的特性来看,多块盘的时候,在性能上没有可比较的地方,但本次mfs分布式存储集群配置,需要使用单盘单卷,因此压测场景如下:

  • 单盘raid0
  • 5块盘raid0
  • 单块盘JBOD
  • 5块盘JBOD

分两种场景:随机写,顺序写。压测采用fio进行。

iops

  seq-write rand-write seq-read rand-read
RAID0 95611 7098 56266 3463
JBOD 463 971 55593 630

bandwidth(kb/s)

  seq-write rand-write seq-read rand-read
RAID0 382448 28393 225065 13852
JBOD 1853.2 3886.8 222374 2521.7

看到这个结果,感觉多盘阵列没有测的必要了。

结论

raid0单盘的顺序写性能大约是JBOD的200倍,随机写性能是其10倍。原因可能因为JBOD是软raid,并不适用raid卡,而写raid使用了WB

两者顺序读性能相似,但随机读性能,raid0大约是JBOD的5倍。

原文地址:https://www.cnblogs.com/wyett/p/7463800.html