Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6401C475C45 for ; Mon, 25 Nov 2002 21:42:57 -0500 (EST) Received: from sabre.velocet.net (sabre.velocet.net [216.138.209.205]) by postgresql.org (Postfix) with ESMTP id 2034C474E61 for ; Mon, 25 Nov 2002 21:42:56 -0500 (EST) Received: from trooper.velocet.ca (trooper.velocet.net [216.138.242.2]) by sabre.velocet.net (Postfix) with ESMTP id 04307138104; Mon, 25 Nov 2002 21:42:59 -0500 (EST) Received: by trooper.velocet.ca (Postfix, from userid 66) id A6CBE748BF; Mon, 25 Nov 2002 21:42:58 -0500 (EST) Received: by canoe.velocet.net (Postfix, from userid 101) id 613BD56763F; Mon, 25 Nov 2002 21:36:30 -0500 (EST) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15842.56878.270786.630651@canoe.velocet.net> Date: Mon, 25 Nov 2002 21:36:30 -0500 To: "Hossein S. Zadeh" Cc: pgsql-admin@postgresql.org Subject: Re: H/W RAID 5 on slower disks versus no raid on faster HDDs In-Reply-To: <1038267828.23100.8.camel@hossein.bf.rmit.edu.au> References: <20021124194154.18989.h017.c001.wm@mail.dilger.cc.criticalpath.net> <15842.4480.962910.969960@canoe.velocet.net> <1038267828.23100.8.camel@hossein.bf.rmit.edu.au> X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/254 X-Sequence-Number: 6442 >>>>> "Hossein" == Hossein S Zadeh writes: Hossein> On Mon, 2002-11-25 at 23:03, David Gilbert wrote: >> I'm on a bit of a mission to stamp out this misconception. In my >> testing, all but the most expensive hardware raid controllers are >> actually slower than FreeBSD's software RAID. I've done my tests >> with a variety of controllers with the same data load and the same >> disks. Hossein> Hi there, Interesting observation. But I am just curious; is Hossein> this still valid when you have a DB server with, say, 95+% Hossein> CPU utilisation??!! (I guess we all know that if one don't Hossein> get high CPU utilisation on a DB server, either the owner has Hossein> had too much money, or the DBA has some fine tuning to do). Typically, the limit on the speed of disk transactions in a modern system is latency. The amount of CPU required to perform a RAID 5 calculation is trivial and RAID 1 scheduling (done efficinetly) is even less demanding on a CPU. ... the latency is the time between when we decide to do the action and when it is able to be done (in this case). In the software RAID-5 case, we need to schedule two reads, perform a caluclation when they return and then schedule two writes. This all happens within the OS's decision to write a block and the block actually being written (and it's why RAID 5 is very slow at writing). RAID-1 writing is simpler ... the Os needs to schedule two writes instead of one. In the hardware case, the OS schedules a write, then it's transferred to the RAID card ... where the RAID card must then schedule the reads and writes. ... which is fine if the RAID card has sufficient buffer... but when things approach saturation of the disk you start to get a number of effects. - if a read doesn't occur before the write must be flushed to disk, nothing is saved by not committing it immediately. - The OS has a good handle on what the data represents and is likely flushing it fairly optimally. Think: your primary CPU is 2Ghz (or more) and your main memory is 1G (or more). Your moderately expensive RAID card is a 100Mhz RISC chip with 64M of memory. How much is this helping? Not much. Remember: hardware RAID is simply RAID software running on another processor. Dave. -- ============================================================================ |David Gilbert, Velocet Communications. | Two things can only be | |Mail: dgilbert@velocet.net | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================