Keith Clay
2006-Sep-29 16:09 UTC
[zfs-discuss] please remove my ignorance of raiding and mirroring
Folks, I''ve heard that for small reads/writes (like a mailstore), mirroring is preferred to raiding. Can some explain why or direct me to that info? I assumed that raidzn would be the preferred method but apparently not. thanks, keith
Frank Cusack
2006-Sep-29 16:38 UTC
[zfs-discuss] please remove my ignorance of raiding and mirroring
On September 29, 2006 11:09:21 AM -0500 Keith Clay <clayk at acu.edu> wrote:> Folks, > > I''ve heard that for small reads/writes (like a mailstore), mirroring is > preferred to raiding. Can some explain why or direct me to that info? > I assumed that raidzn would be the preferred method but apparently not.<http://blogs.sun.com/roch/entry/when_to_and_not_to>
Anton B. Rang
2006-Sep-29 17:08 UTC
[zfs-discuss] Re: please remove my ignorance of raiding and mirroring
Mirroring is more efficient for small reads (the size of one ZFS block or less) because only one disk has to be accessed. Since RAID-Z spreads a ZFS block across multiple disks, and the data from all disks is required to verify the checksum, every read accesses every disk. Mirror read: 1. Pick one of two (or more) disks. 2. Read from that disk. 3. Verify that the data is correct. RAID-Z read: 1. Determine which disks hold the requested data. 2. Read from all of them. 3. Verify that the data is correct. Small writes, or larger writes which do not exactly line up with a ZFS block, require a pre-read of the old data. As for other reads, this requires accessing all disks in the RAID-Z case. Large writes, however, should be more efficient using RAID-Z instead of mirroring, as less total data is written to disk (data+parity, instead of data+data), and a pre-read is only required at the beginning and end of the range being written. This is a difference from RAID-5. In RAID-5, small reads are more efficient than mirroring because there are more disk spindles available, and a small read usually uses only one. Small writes are less efficient than mirroring in RAID-5 because they require a pre-read phase (though only to two disks, rather than all). This message posted from opensolaris.org
Richard Elling - PAE
2006-Oct-01 05:14 UTC
[zfs-discuss] Re: please remove my ignorance of raiding and mirroring
Anton B. Rang wrote:> This is a difference from RAID-5. In RAID-5, small reads are more efficient than > mirroring because there are more disk spindles available, and a small read > usually uses only one. Small writes are less efficient than mirroring in RAID-5 > because they require a pre-read phase (though only to two disks, rather than all).I don''t believe this statement is generally true. Consider the case of 4 disks. RAID-1+0 could service 4 independent read iops concurrently. RAID-5 could only service 2 independent read iops concurrently. More generally, the 2-way mirror, RAID-1+0 could always service at least 2 (>= N/2) independent read iops concurrently while RAID-5 could only service a maximum of 2 (<= int(N/2)) concurrent read iops. -- richard
Anton B. Rang
2006-Oct-02 04:24 UTC
[zfs-discuss] Re: Re: please remove my ignorance of raiding andmirroring
I was perhaps slightly hasty; RAID-5 is more efficient than a 2-disk mirror for reads, but RAID-10 (striping & mirroring) can match (or slightly exceed) its efficiency for small reads. In both cases, there is a single disk accessed. With 4 disks, RAID-1+0 can service four independent reads concurrently, while RAID-5 can service up to four independent reads concurrently, but perhaps as few as 1 if all reads are directed to the same spindle. Under heavy loads, all spindles will generally be busy, so performance is similar. This message posted from opensolaris.org
Keith Clay
2006-Oct-02 14:22 UTC
[zfs-discuss] Re: Re: please remove my ignorance of raiding andmirroring
On Oct 1, 2006, at 11:24 PM, Anton B. Rang wrote:> I was perhaps slightly hasty; RAID-5 is more efficient than a 2- > disk mirror for reads, but RAID-10 (striping & mirroring) can match > (or slightly exceed) its efficiency for small reads. In both cases, > there is a single disk accessed. > > With 4 disks, RAID-1+0 can service four independent reads > concurrently, while RAID-5 can service up to four independent reads > concurrently, but perhaps as few as 1 if all reads are directed to > the same spindle. Under heavy loads, all spindles will generally be > busy, so performance is similar. >Let me see if I understand. If I have a RAID10 with 4 or more disk, then for a mailstore this would be the optimal solution. I expect to have 6 or more disk in mirrors, so would that increase it''s efficiency? keith