Loading... <div class="tip inlineBlock info"> 转载文章, 原文[链接](https://www.liujason.com/article/679.html) </div> ## 前言 使用ZFS已经有两年多了,一直很好奇ZFS的不同阵列之间的读写性能差别到底有多大?普通的Raid阵列中,不同的阵列等级的性能基本上都可以直接换算出来,但是ZFS的性能因为多了内存缓存等因素,实际使用中的差异到底有多大就需要实测一下了。 ![](https://zoe.red/usr/uploads/2024/01/2048830146.png) ## Raid等级概述 ### RAID0或stripe条带化阵列 *没有冗余,但是可提供最佳性能和附加存储。* 任何驱动器故障都会破坏整个阵列,**因此RAID 0根本不安全。** 如果您需要非常快的暂存空间来进行视频编辑,那么RAID0会很好。 补充: Raid0 会把一个文件分拆到多块硬盘上存储, 因此写入与读取性能随着构成阵列的盘数N的增加而增加(但是非一直线性关系) ### RAID1或mirror镜像 *在阵列中的每个驱动器上镜像相同的数据, 这是极好的冗余,因此您可能会丢失除一个驱动器之外的所有驱动器,并且仍然可以访问数据。* 肯定的是,阵列中添加的每个驱动器都会提高RAID读取速度。**最大的缺点是容量低和写入速度慢。** 无论团队中有多少驱动器,您都可以使用单个驱动器的总容量。由于每个驱动器都会获得相同文件的完整副本,因此速度会降低。镜像通常用于两个驱动器,而不是像我们的测试中那样用于12和24的驱动器,因为存在大量的浪费空间。 ### RAID 2,RAID 3和RAID 4 未经过测试,因为IT行业不再使用它们。 ### RAID5或RAIDZ 会与数据一起分发奇偶校验,并且在RAID失败之前可能会丢失一个物理驱动器。因为需要计算奇偶校验,所以RAID 5比RAID0慢,但是RAID 5更安全。 RAID 5至少需要三个硬盘,其中一个完整磁盘空间用于奇偶校验。 ### RAID6或RAIDZ2 会与数据一起分配奇偶校验,并且可能会丢失两个物理驱动器,而不是像RAID 5那样仅丢失一个物理驱动器。因为需要计算更多的奇偶校验,所以RAID6比RAID5慢,但是RAID6更安全。 RAIDz2至少需要四个磁盘,并且将使用两个磁盘空间进行奇偶校验。 ### RAID7或RAIDZ3 就像RAID 5和6一样分配奇偶校验,但是RAID7会丢失三个物理驱动器。由于需要计算三重奇偶校验,因此RAID 7比RAID5和RAID 6慢,但是RAID 7是三个中最安全的。 RAIDz3至少需要四个磁盘,但应与至少五个磁盘一起使用,其中三个磁盘空间用于奇偶校验。 ### RAID10或RAID1 0 是数据的镜像和条带化。最简单的RAID10阵列有四个磁盘,由两对镜像组成。磁盘1和2是镜像,磁盘3和4分别是另一个镜像。然后,在两个镜像之间对数据进行条带化(考虑RAID0)。您可以在每个镜像中丢失一个驱动器,并且数据仍然安全。您不能丢失组成一个镜像的两个驱动器,例如,驱动器1和2不能同时丢失。突袭10的优点是读取数据的速度很快。缺点是写入速度慢(多个镜像)并且容量低。 ### RAID60或RAID6 0 是两个或更多RAID6卷的条带。您将获得RAID6安全性(每个RAID6阵列丢失两个驱动器)和RAID0条带化读取速度的优势。底片与RAID10相同。 ### RAID70或RAID7 0 是两个或更多RAID7卷的条带。就像RAID6一样,您可以利用RAID7安全性和RAID0条带化读取速度,但会失去容量。 ## 实测情况 ![](https://zoe.red/usr/uploads/2024/01/2435089417.png) THE END 本文作者:将夜 本文链接:https://zoe.red/2024/108.html 版权声明:本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 4.0 许可协议。 最后修改:2024 年 10 月 17 日 © 转载自他站 赞 如果觉得我的文章对你有用,请随意赞赏