西西河

主题:【原创】家用硬盘阵列RAID实例-壹 -- 梦回唐朝

共:💬83 🌺127 新:
分页树展主题 · 全看首页 上页
/ 6
下页 末页
              • 家园 【讨论】觉得你所提的性能问题应该是正常的。

                “读写峰值持续几秒” - 应该是array controller的cache的作用。

                “然后迅速下降到比单个盘稍快的地步” - 实际上你的controller是相当不错的。要知道RAID 5的写操作的overhead是很严重的。最近刚升级完文件服务器,用的是3GB SAS 12HDD RAID5,峰值也就是7-8Mbyte/s.

                我认为RAID5主要优势是性能和费用平衡的比较好。如果对读写性能要求较高,可能RAID1或RAID1+0更合适一些。

                下面引用一段:

                # Striping With Parity: As with mirroring, write performance when striping with parity (RAID levels 3 through 6) is worse than read performance, but unlike mirroring, the "hit" taken on a write when doing striping with parity is much more significant. Here's how the different accesses fare:

                * For reads, striping with parity can actually be faster than striping without parity. The parity information is not needed on reads, and this makes the array behave during reads in a way similar to a RAID 0 array, except that the data is spread across one extra drive, slightly improving parallelism.

                * For sequential writes, there is the dual overhead of parity calculations as well as having to write to an additional disk to store the parity information. This makes sequential writes slower than striping without parity.

                * The biggest discrepancy under this technique is between random reads and random writes. Random reads that only require parts of a stripe from one or two disks can be processed in parallel with other random reads that only need parts of stripes on different disks. In theory, random writes would be the same, except for one problem: every time you change any block in a stripe, you have to recalculate the parity for that stripe, which requires two writes plus reading back all the other pieces of the stripe! Consider a RAID 5 array made from five disks, and a particular stripe across those disks that happens to have data on drives #3, #4, #5 and #1, and its parity block on drive #2. You want to do a small "random write" that changes just the block in this stripe on drive #3. Without the parity, the controller could just write to drive #3 and it would be done. With parity though, the change to drive #3 affects the parity information for the entire stripe. So this single write turns into a read of drives #4, #5 and #1, a parity calculation, and then a write to drive #3 (the data) and drive #2 (the newly-recalculated parity information). This is why striping with parity stinks for random write performance. (This is also why RAID 5 implementations in software are not recommended if you are interested in performance.)

                * Another hit to write performance comes from the dedicated parity drive used in certain striping with parity implementations (in particular, RAID levels 3 and 4). Since only one drive contains parity information, every write must write to this drive, turning it into a performance bottleneck. Under implementations with distributed parity, like RAID 5, all drives contain data and parity information, so there is no single bottleneck drive; the overheads mentioned just above still apply though.

              • 家园 不知是否跟低端控制器有关

                这类低端控制器不象其他纯硬件控制器那样有自己的xor processor for RAID 5,也没有自己的cache,所以需要依赖主机的CPU和内存资源支持。性能方面可能会受到影响。

                • 家园 主要还是RAID5本身的问题

                  现代主流PC的CPU和内存处理RAID5那点运算是没有任何负担的。

                  RAID5理论上就是小写性能极低,比单盘还低得多。但现代文件系统却需要很多小写操作管理元数据。很多这样的小写是不能被cache缓存的,一些是为保证数据安全不允许缓存,一些是因为非局部反复/连续写所以缓存无意义也无法提高性能。这就导致RAID5性能难以提高。即使是高端的产品也不行。我正用的机器是4盘RAID5主板集成芯片的,我们的工作组服务器是12盘中档128MB缓存硬件RAID5,这两者性能差别不大。我们的数据中心是133光纤盘的企业级最高端盘阵(HP EVA 8100),其性能也并不突出。

                  对某些工作组级别的服务器,如果需要10TB以上的容量,可能RAID5是不得不用的,因为目前的硬件要做到10TB的RAID1+0还价格太贵。但自用和小型服务器,不超过4TB的容量需求的话,RAID1+0或RAID1都比RAID5更好。

                  • 家园 您说的是Mbyte/s还是Mbit/s?

                    要是100Mbyte/s那可是相当好的速度了呀,公司的存储做Catia备份,网络传输速度也就是350Mb/sde 样子,折成字节50MB/s不到。光纤千兆实际能到800Mb/s的样子,也就是100Mbyte/s左右。

                    • 家园 MByte/s

                      我们最高端的控制器 HP EVA8100、4路光纤接口,最高端的NAS外加10GbE的出口,当然要到100Mbyte/s的性能才能接受了。即使是100Mbyte/s我也觉得低了呢

                      当然通过网络之后速度就直线下降了,即使我们的10GbE的网络上,读写速度也很慢的,比千兆网快不了多少,网络带宽利用率不足1%。这是网络文件系统的固有问题,和后端的盘阵的速度没有关系。

                  • 家园 我们这里用raid 5也主要考虑的是大容量

                    大容量虽然还可以用JBOD(Just a Bunch Of Disks)

                    不过JBOD就谈不上什么灾后恢复了

                    raid 5如果真出问题了

                    rebuild一次也蛮费时的

                    我个人倾向是家用文件服务器的硬盘一个个往上加就是了

                    一般家里也不太可能一次采购就把空位塞满

                    下次买,又是不一样的盘了

                    对可靠性有要求又要数据在线的可以部分硬盘raid 1

                    毕竟单硬盘速度就足够把一条Gigabit Ethernet线撑满了

                    在工作机上可以用ssd装系统

                    追求持续写入的可以数据盘raid 0

                    但是工作机一般没必要挂太多的硬盘

                    工作机-文件服务器之间可以定时sync

                    特别重要的数据(一般不会很多)还要用其他手段备份

                    回过头来,还是要看实际的需求

                    脱离具体的应用谈何种raid好没什么意义

                    • 家园 家用我倒建议开始就上RAID1

                      上RAID1+0没有太大必要,且功耗、噪声太大。不做RAID可靠性确实差,现在硬盘容量这么大,坏一次就大杯具了。后面如果需要的话,用RAID1+JBOD扩展即可。事实上家用扩展的可能性应当不大,更多的是随机器一起全面升级了。买的时候就多准备一点容量,现在1.5TB的RAID1成本都是不用考虑的。

                      SSD同样是可靠性的问题比较麻烦。系统盘坏了虽然数据可以不丢,但严重影响工作。我希望有机器有这样的配置:2个CF或SD槽可以做RAID1,4个SATA口可以做RAID1+0和RAID1+JBOD。但似乎还没有这样的机器。

                      另外,根据我们实际使用的经验,网络文件访问的性能是比较差的,无论物理硬盘多快(甚至用内存盘也无法提高多少),即便是使用GbE甚至是10GbE。要文件访问性能的话,还得把数据放本地。放服务器上就不要指望性能了。服务器的目的是大容量、可靠性和多人共享。

分页树展主题 · 全看首页 上页
/ 6
下页 末页


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河