From owner-freebsd-stable Fri Nov 29 4: 9:37 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49A4037B401 for ; Fri, 29 Nov 2002 04:09:36 -0800 (PST) Received: from mailhost.firstcallgroup.co.uk (dilbert.firstcallgroup.co.uk [194.200.93.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E6A243E88 for ; Fri, 29 Nov 2002 04:09:35 -0800 (PST) (envelope-from pfrench@firstcallgroup.co.uk) Received: from pfrench by mailhost.firstcallgroup.co.uk with local (Exim 3.36 #1) id 18HjxZ-000Bwe-00; Fri, 29 Nov 2002 12:09:29 +0000 To: pfrench@firstcallgroup.co.uk, stable@FreeBSD.ORG Subject: Re: RAID performance problems - solution In-Reply-To: Message-Id: From: Pete French Date: Fri, 29 Nov 2002 12:09:29 +0000 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [for those people wo were intereested.... not really related to -STABLE other than I have satisfied myself that this isnt anything to do with it!] For those who missed the original posting I was puzzling hard over the fact that a RAID-5 array of 7200 rpm discs semeed to perform exactly the same as a RAID-1 array of 10000 discs under bonnie. I was concerned that this was a BSD driver bottleneck. The reasoning was that a RAID-1 write is two writes, and if you have a decent controller optimising yur RAID-5 writes then they come doown to 2 writes (data and parity). So the array with faster drives should have faster performance. Upon more careful thought, however, this isnt true. A RAID-5 write can only be optimised to writes-only if you are writing a block big enough that you do not need to read in the parity. Now, I have five drives in that array. So let us consider writing 5 sectors worth of data out. Under the RAID-5 that will reduce to 5 writes, but on the RAID-1 where everything is mirrored it becomes 8 writes. So worst case (sequential wrtes) the RAID-5 should be *faster* to write to by a factor of 5/8. But the drives on the RAID-1 are faster than those on the RAID-5. The 10k drives have a seek of 4.5 with a latency of 3 whilst the 7200s have a seek of 6.8 with a latency of 4.2 (manufacturers data). So the RAID-1 drives are faster than the RAID-5's by a factor of 11.0/7.5. Do the sums and it turns out that the RAID-5 with theorieticaly be about 9% faster than the RAID-1. But we were talking about worst case in that calculation and I can easily believe that optimisation by the RAID controller (parallelising writes to the drives for example) can reduce that down by parallelising the writes. Which could easily make it vanish to the point where the write speed seems the same. That solves the mystery as far as I am concerned - and (as usual) teaches the lesson about thinking very hard about exactly what benckmarks are measuring - even when just using them to make relative measurements. -pcf. [ someones about to knock holes in all my maths arent they ? :-) ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message