现在的位置: 首页 > 云计算 > 正文
RAID5和RAID10,哪种RAID适合你(上)
2012年12月25日 云计算, 存储技术 ⁄ 共 2562字 评论数 5 ⁄ 被围观 4,330 views+

存储是目前IT产业发展的一大热点,而RAID技术是构造高性能、海量存储的基础技术,也是构建网络存储的基础技术。专家认为,磁盘阵列的性能优势得益于磁盘运行的并行性,提高设备运行并行度可以提高磁盘的性能和数据安全性。

20年来,RAID 推出了一系列级别,包括RAID 0、RAID 1、RAID 2、RAID 3、RAID4、RAID 5,以及各种组合如 RAID 0 1 等。其中最广泛的包括RAID5与RAID10.但是一直以来,关于RAID5与RAID10的性能优劣的争端还是非常多的,甚至很多人包括很多公司都那拿出了测试数据。而这些测试数据复杂难懂相互矛盾,更加让用户感到迷惑,不知道怎么选择。

在这里,我将就这两种RAID的内部运行原理来分析一下,看看我们在什么情况下应当适合选哪一种RAID方式。根据我的经验与分析:象小io的数据库类型操作,如ERP等等应用,建议采用RAID10,而大型文件存储,数据仓库,如医疗PACS系统、视频编辑系统则从空间利用的角度,建议采用RAID5.下面请看具体的性能对比:

为了方便对比,我这里拿同样多驱动器的磁盘来做对比,RAID5选择3D 1P的RAID方案,RAID10选择2D 2D的Raid方案,分别如图:

那么,我们分析如下三个过程:读,连续写,随机写,但是,在介绍这三个过程之前,我需要介绍另外一个磁盘阵列中的重要概念:cache.

磁盘读写速度的要害之一:Cache

cache技术最近几年,在磁盘存储技术上,发展的非常迅速,作为高端存储,cache已经是整个存储的核心所在,就是中低端存储,也有很大的cache存在,包括最简单的RAID卡,一般都包含有几十,甚至几百兆的RAID cache.

cache的主要作用是什么呢?作为缓存,cache的作用具体体现在读与写两个不同的方面:作为写,一般存储阵列只要求数据写到cache就算完成了写操作,当写cache的数据积累到一定程度,阵列才把数据刷到磁盘,可以实现批量的写入。所以,阵列的写是非常快速的。至于cache数据的保护,一般都依靠于镜相与电池(或者是UPS)。

cache在读数据方面的作用一样不可忽视,因为假如所需要读取的数据能在cache中命中的话,将大大降低磁盘寻道所需要的时间。因为磁盘从开始寻道到找到数据,一般都在6ms以上,而这个时间,对于那些密集型I/O的应用可能不是太理想。但是,假如能在cache保存的数据中命中,一般响应时间则可以缩短在1ms以内。

不要迷信存储厂商的IOPS(每秒的io数)数据,他们可能全部在cache命中的基础上做到的,但是实际上,你的cache命中率可能只有10%.

介绍完cache,我们就可以解释RAID5与RAID10在不同的模式下,工作效率问题了,那么我们来分别分析读操作、连续写和离散写三方面的问题。

读操作方面的性能差异

如我上文的介绍,磁盘阵列读操作的要害更多的体现在cache的命中率上。所以,RAID5和RAID10在读数据上面,他们基本是没有差别的,除非是读的数据能影响cache命中率,导致命中率不一样。

连续写方面的性能差异

连续写的过程,一般表示写入连续的大批量的数据,如媒体数据流,很大的文件等等。连续写操作大部分产生于医疗PACS系统、高教图书馆系统、视频编辑系统等等应用环境下。

根据我本人的经验,在连续写操作过程,假如有写cache存在,并且算法没有问题的话,RAID5比RAID10甚至会更好一些,虽然也许并没有太大的差别。(这里要假定存储有一定大小足够的写cache,而且计算校验的cpu不会出现瓶颈)。

因为这个时候的RAID校验是在cache中完成,如4块盘的RAID5,可以先在内存中计算好校验,同时写入3个数据 1个校验。而RAID10只能同时写入2个数据 2个镜相。

如上图所示,4块盘的RAID5可以在同时间写入1、2、3到cache,并且在cache计算好校验之后,我这里假定是6(实际的校验计算并不是这样的,我这里仅仅是假设),同时把三个数据写到磁盘。而4块盘的RAID10不管cache是否存在,写的时候,都是同时写2个数据与2个镜相。

根据我前面对缓存原理的介绍,写cache是可以缓存写操作的,等到缓存写数据积累到一定时期再写到磁盘。但是,写到磁盘阵列的过程是迟早也要发生的,所以RAID5与RAID10在连续写的情况下,从缓存到磁盘的写操作速度会有较小的区别。不过,假如不是连续性的强连续写,只要不达到磁盘的写极限,差别并不是太大。

离散写方面的性能差异

这里可能会较难理解,但是,这一部分也是最重要的部分。企业中的绝大部分数据库应用,如ERP系统等等在数据写入的时候其实都是离散写。

例如oracle 数据库每次写一个数据块的数据,如8K;由于每次写入的量不是很大,而且写入的次数非常频繁,因此联机日志看起来会像是连续写。但是因为不保证能够添满RAID5的一个条带(保证每张盘都能写入),所以很多时候更加偏向于离散写入。

我们从上图看一下离散写的时候,RAID5与RAID10工作方式有什么不同。如上图:我们假定要把一个数字2变成数字4,那么对于RAID5,实际发生了4次io:先读出2与校验6,可能发生读命中然后在cache中计算新的校验写入新的数字4与新的校验8

如上图我们可以看到:对于RAID10,同样的单个操作,最终RAID10只需要2个io,而RAID5需要4个io.

这里我忽略了RAID5在那两个读操作的时候,可能会发生读命中操作的情况。也就是说,假如需要读取的数据已经在cache中,可能是不需要4个io的。这也证实了cache对RAID5 的重要性,不仅仅是计算校验需要,而且对性能的提高尤为重要。我本人曾经测试过,在RAID5的阵列中,假如关闭写cache,RAID5的性能将差很多倍。

当然,我并不是说cache对RAID10就不重要了,因为写缓冲,读命中等,都是提高速度的要害所在,不过的是,RAID10对cache的依靠性没有RAID5那么明显而已。

到这里,大家应当也大致明白了RAID5与RAID10的原理与差别了,一般来说,象小io的数据库类型操作,建议采用RAID10,而大型文件存储,数据仓库,则从空间利用的角度,可以采用RAID5.

目前有 5 条留言 其中:访客:5 条, 博主:0 条

  1. SwiftUnlocks - SwiftUnlock : 2017年05月20日11:44:40  -49楼 @回复 回复

    Executive pleading poverty after $44M judgment Symons and family ordered to pay $34.2 million in fraud case Alan Symons In the United States Court of Appeals Arie Abekasis Diditan Financial ARIE ABEKASIS DIDITAN FINANCIAL DIDITAN GROUP ARIE ABEKASIS OF DIDITAN Richard Ellenbogen – Beverly Hills Body Richard Ellenbogen – Beverly Hills Body – Babak Dadvand Beverly Hills Body Plastic Surgeons – Richard Ellenbogen MD Richard Ellenbogen And Babak Dadvand Plastic Surgeons Of Beverly Hills Richard Ellenbogen Plastic Surgeon And Babak Dadvand Richard Ellenbogen Md Plastic Surgery Rhinoplasty Nose Job Richard Ellenbogen Beverly Hills Body Cosmetic Plastic And Reconstructive Surgeon Richard Ellenbogen Plastic Surgeon – Babak Dadvand Richard Ellenbogen Beverly Hills Body And Babak Dadvand Richard Ellenbogen – Beverly Hills Body BRIAN WILLIS Brockstar DAN ANTON: BACKLINKSVAULT and BrandlinksRank dan anton Kotton Grammer OMG Machines SCAM Don Tigert granger whitelaw Richard Cosentino John Schmutzer Exotic Images LLC CMC Choppers Jim Haszinger COSENTINO N Ripoff Reports Complaints Reviews Scams Lawsuits and Frauds Reported Jim Haszinger KaonSoftwares Kaon Softwares Emergency Vehicle Lights Light bars Sirens LED Outfitters Lise Winicki LuxSauna Auto Connection Manassas Complaint Review: Poggi Michael Michael Poggi Poggi’s Animal House Complaint Review: Michael Poggi Poggisanimalhouse 9547089441 Complaint Review: Mountain Business Center LLC Rebecca Bextel SwiftUnlocks Elite Client Services Complaint Review: Naushad Noordin Velani Complaint Review: Trey Knight Trey Knight trey night Haskel Grant Knight Haskel G Knight FHTM LIMU Danger Trey Knight Uses fake social security numbers Trey Knight Atlantic Beach, Florida Trey Knight is a Scammer LA Laser Center Gerardo Cornejo Velez 多伦多中医吴冠英 Conslines.com

  2. Jim Haszinger : 2017年05月20日11:45:25  -48楼 @回复 回复

    Executive pleading poverty after $44M judgment Symons and family ordered to pay $34.2 million in fraud case Alan Symons In the United States Court of Appeals Arie Abekasis Diditan Financial ARIE ABEKASIS DIDITAN FINANCIAL DIDITAN GROUP ARIE ABEKASIS OF DIDITAN Richard Ellenbogen – Beverly Hills Body Richard Ellenbogen – Beverly Hills Body – Babak Dadvand Beverly Hills Body Plastic Surgeons – Richard Ellenbogen MD Richard Ellenbogen And Babak Dadvand Plastic Surgeons Of Beverly Hills Richard Ellenbogen Plastic Surgeon And Babak Dadvand Richard Ellenbogen Md Plastic Surgery Rhinoplasty Nose Job Richard Ellenbogen Beverly Hills Body Cosmetic Plastic And Reconstructive Surgeon Richard Ellenbogen Plastic Surgeon – Babak Dadvand Richard Ellenbogen Beverly Hills Body And Babak Dadvand Richard Ellenbogen – Beverly Hills Body BRIAN WILLIS Brockstar DAN ANTON: BACKLINKSVAULT and BrandlinksRank dan anton Kotton Grammer OMG Machines SCAM Don Tigert granger whitelaw Richard Cosentino John Schmutzer Exotic Images LLC CMC Choppers Jim Haszinger COSENTINO N Ripoff Reports Complaints Reviews Scams Lawsuits and Frauds Reported Jim Haszinger KaonSoftwares Kaon Softwares Emergency Vehicle Lights Light bars Sirens LED Outfitters Lise Winicki LuxSauna Auto Connection Manassas Complaint Review: Poggi Michael Michael Poggi Poggi’s Animal House Complaint Review: Michael Poggi Poggisanimalhouse 9547089441 Complaint Review: Mountain Business Center LLC Rebecca Bextel SwiftUnlocks Elite Client Services Complaint Review: Naushad Noordin Velani Complaint Review: Trey Knight Trey Knight trey night Haskel Grant Knight Haskel G Knight FHTM LIMU Danger Trey Knight Uses fake social security numbers Trey Knight Atlantic Beach, Florida Trey Knight is a Scammer LA Laser Center Gerardo Cornejo Velez 多伦多中医吴冠英 Conslines.com

  3. Alan Symons : 2017年05月20日11:45:41  -47楼 @回复 回复

    Executive pleading poverty after $44M judgment Symons and family ordered to pay $34.2 million in fraud case Alan Symons In the United States Court of Appeals Arie Abekasis Diditan Financial ARIE ABEKASIS DIDITAN FINANCIAL DIDITAN GROUP ARIE ABEKASIS OF DIDITAN Richard Ellenbogen – Beverly Hills Body Richard Ellenbogen – Beverly Hills Body – Babak Dadvand Beverly Hills Body Plastic Surgeons – Richard Ellenbogen MD Richard Ellenbogen And Babak Dadvand Plastic Surgeons Of Beverly Hills Richard Ellenbogen Plastic Surgeon And Babak Dadvand Richard Ellenbogen Md Plastic Surgery Rhinoplasty Nose Job Richard Ellenbogen Beverly Hills Body Cosmetic Plastic And Reconstructive Surgeon Richard Ellenbogen Plastic Surgeon – Babak Dadvand Richard Ellenbogen Beverly Hills Body And Babak Dadvand Richard Ellenbogen – Beverly Hills Body BRIAN WILLIS Brockstar DAN ANTON: BACKLINKSVAULT and BrandlinksRank dan anton Kotton Grammer OMG Machines SCAM Don Tigert granger whitelaw Richard Cosentino John Schmutzer Exotic Images LLC CMC Choppers Jim Haszinger COSENTINO N Ripoff Reports Complaints Reviews Scams Lawsuits and Frauds Reported Jim Haszinger KaonSoftwares Kaon Softwares Emergency Vehicle Lights Light bars Sirens LED Outfitters Lise Winicki LuxSauna Auto Connection Manassas Complaint Review: Poggi Michael Michael Poggi Poggi’s Animal House Complaint Review: Michael Poggi Poggisanimalhouse 9547089441 Complaint Review: Mountain Business Center LLC Rebecca Bextel SwiftUnlocks Elite Client Services Complaint Review: Naushad Noordin Velani Complaint Review: Trey Knight Trey Knight trey night Haskel Grant Knight Haskel G Knight FHTM LIMU Danger Trey Knight Uses fake social security numbers Trey Knight Atlantic Beach, Florida Trey Knight is a Scammer LA Laser Center Gerardo Cornejo Velez 多伦多中医吴冠英 Conslines.com

  4. Auto Connection : 2017年05月20日11:45:56  -46楼 @回复 回复

    Executive pleading poverty after $44M judgment Symons and family ordered to pay $34.2 million in fraud case Alan Symons In the United States Court of Appeals Arie Abekasis Diditan Financial ARIE ABEKASIS DIDITAN FINANCIAL DIDITAN GROUP ARIE ABEKASIS OF DIDITAN Richard Ellenbogen – Beverly Hills Body Richard Ellenbogen – Beverly Hills Body – Babak Dadvand Beverly Hills Body Plastic Surgeons – Richard Ellenbogen MD Richard Ellenbogen And Babak Dadvand Plastic Surgeons Of Beverly Hills Richard Ellenbogen Plastic Surgeon And Babak Dadvand Richard Ellenbogen Md Plastic Surgery Rhinoplasty Nose Job Richard Ellenbogen Beverly Hills Body Cosmetic Plastic And Reconstructive Surgeon Richard Ellenbogen Plastic Surgeon – Babak Dadvand Richard Ellenbogen Beverly Hills Body And Babak Dadvand Richard Ellenbogen – Beverly Hills Body BRIAN WILLIS Brockstar DAN ANTON: BACKLINKSVAULT and BrandlinksRank dan anton Kotton Grammer OMG Machines SCAM Don Tigert granger whitelaw Richard Cosentino John Schmutzer Exotic Images LLC CMC Choppers Jim Haszinger COSENTINO N Ripoff Reports Complaints Reviews Scams Lawsuits and Frauds Reported Jim Haszinger KaonSoftwares Kaon Softwares Emergency Vehicle Lights Light bars Sirens LED Outfitters Lise Winicki LuxSauna Auto Connection Manassas Complaint Review: Poggi Michael Michael Poggi Poggi’s Animal House Complaint Review: Michael Poggi Poggisanimalhouse 9547089441 Complaint Review: Mountain Business Center LLC Rebecca Bextel SwiftUnlocks Elite Client Services Complaint Review: Naushad Noordin Velani Complaint Review: Trey Knight Trey Knight trey night Haskel Grant Knight Haskel G Knight FHTM LIMU Danger Trey Knight Uses fake social security numbers Trey Knight Atlantic Beach, Florida Trey Knight is a Scammer LA Laser Center Gerardo Cornejo Velez 多伦多中医吴冠英 Conslines.com

  5. Executive pleading poverty after $44M judgment Symons and family ordered to pay $34.2 million in fraud case Alan Symons In the United States Court of Appeals Arie Abekasis Diditan Financial ARIE ABEKASIS DIDITAN FINANCIAL DIDITAN GROUP ARIE ABEKASIS OF DIDITAN Richard Ellenbogen – Beverly Hills Body Richard Ellenbogen – Beverly Hills Body – Babak Dadvand Beverly Hills Body Plastic Surgeons – Richard Ellenbogen MD Richard Ellenbogen And Babak Dadvand Plastic Surgeons Of Beverly Hills Richard Ellenbogen Plastic Surgeon And Babak Dadvand Richard Ellenbogen Md Plastic Surgery Rhinoplasty Nose Job Richard Ellenbogen Beverly Hills Body Cosmetic Plastic And Reconstructive Surgeon Richard Ellenbogen Plastic Surgeon – Babak Dadvand Richard Ellenbogen Beverly Hills Body And Babak Dadvand Richard Ellenbogen – Beverly Hills Body BRIAN WILLIS Brockstar DAN ANTON: BACKLINKSVAULT and BrandlinksRank dan anton Kotton Grammer OMG Machines SCAM Don Tigert granger whitelaw Richard Cosentino John Schmutzer Exotic Images LLC CMC Choppers Jim Haszinger COSENTINO N Ripoff Reports Complaints Reviews Scams Lawsuits and Frauds Reported Jim Haszinger KaonSoftwares Kaon Softwares Emergency Vehicle Lights Light bars Sirens LED Outfitters Lise Winicki LuxSauna Auto Connection Manassas Complaint Review: Poggi Michael Michael Poggi Poggi’s Animal House Complaint Review: Michael Poggi Poggisanimalhouse 9547089441 Complaint Review: Mountain Business Center LLC Rebecca Bextel SwiftUnlocks Elite Client Services Complaint Review: Naushad Noordin Velani Complaint Review: Trey Knight Trey Knight trey night Haskel Grant Knight Haskel G Knight FHTM LIMU Danger Trey Knight Uses fake social security numbers Trey Knight Atlantic Beach, Florida Trey Knight is a Scammer LA Laser Center Gerardo Cornejo Velez 多伦多中医吴冠英 Conslines.com

给我留言

留言无头像?


×