From owner-freebsd-scsi Fri Oct 12 16:54:44 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 8200937B401; Fri, 12 Oct 2001 16:54:40 -0700 (PDT) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.5/8.11.5) with ESMTP id f9CNscY23560; Fri, 12 Oct 2001 17:54:39 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Message-Id: <200110122354.f9CNscY23560@aslan.scsiguy.com> To: Mike Smith Cc: Scott Long , Alexey Koptsevich , scsi@FreeBSD.ORG, msmith@mass.dis.org Subject: Re: Adaptec 3210S: RAID5 performance and bus throughput In-Reply-To: Your message of "Fri, 12 Oct 2001 16:37:30 PDT." <200110122337.f9CNbUk05018@mass.dis.org> Date: Fri, 12 Oct 2001 17:54:38 -0600 From: "Justin T. Gibbs" Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >> >> RAID5 read performance will be almost identical to RAID0 read performance. >> Write performace will be considerably less because it involves more than >> just writing to one disk; if you are writing a piece of data that is less >> than the size of a full stripe, you will also have to read the parity >> disk, compute the parity, and then write out the data plus the parity. > >This is (often but not always) correct, but misleading. > >RAID5 parity is typically byte-parallel, ie. if you have N disks and >you are writing one byte, you only actually *need* to read N-1 bytes >(one from each of the disks to which you are not writing) to compute >the parity, and write 2 bytes. For small writes, you read the blocks you are about to overwrite and the old parity block, XOR the old data into the parity data, XOR the new data into the parity, and finally write both the parity and the new data out. In otherwords, you need only read from the parity disk and those disks in the stripe that will be modified. Of course, if the number of disks to be modified is greater than the disks left unmodified, it is an optimization to just fully recalculate the parity by reading only from the unmodified members as you show above. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message