Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 00D9C650E98 for ; Thu, 26 Jun 2008 16:15:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 67826-01 for ; Thu, 26 Jun 2008 16:14:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp03.uc3m.es (smtp03.uc3m.es [163.117.176.133]) by postgresql.org (Postfix) with ESMTP id 2D852650E82 for ; Thu, 26 Jun 2008 16:14:57 -0300 (ADT) Received: from triangulo.it.uc3m.es (arpa.it.uc3m.es [163.117.139.120])(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))(No client certificate requested)by smtp03.uc3m.es (Postfix) with ESMTP id 0E3D23F79C7;Thu, 26 Jun 2008 21:14:55 +0200 (CEST) Received: from nbd.it.uc3m.es (root@nbd.it.uc3m.es [163.117.139.192])by triangulo.it.uc3m.es (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id m5QJEs31017487;Thu, 26 Jun 2008 21:14:54 +0200 Received: from inv.it.uc3m.es (oboe.it.uc3m.es [163.117.139.101])by nbd.it.uc3m.es (8.13.1/8.13.1/Debian-15) with ESMTP id m5QJEsBp030277; Thu, 26 Jun 2008 21:14:54 +0200 Received: (from ptb@localhost)by inv.it.uc3m.es (8.11.0/8.11.0) id m5Q53cA24979;Thu, 26 Jun 2008 07:03:38 +0200 From: "Peter T. Breuer" Message-Id: <200806260503.m5Q53cA24979@inv.it.uc3m.es> Subject: Re: Hardware vs Software Raid In-Reply-To: from"Merlin Moncure" at "Jun 26, 2008 01:26:00 pm" To: "Merlin Moncure" Date: Thu, 26 Jun 2008 07:03:38 +0200 (MET DST) CC: ptb@inv.it.uc3m.es, "Matthew Wakeling" , pgsql-performance@postgresql.org X-Anonymously-To: Reply-To: ptb@inv.it.uc3m.es X-message-flag: Had your Outlook virus, today? http://www.counterpane.com/crypto-gram-0103.html#4 X-WebTV-Stationery: Standard\; BGColor=black\; TextColor=black Reply-By: Sat, 1 Apr 2006 14:21:08 -0700 X-Mailer: ELM [version 2.4ME+ PL66 (25)] X-imss-version: 2.051 X-imss-result: Passed X-imss-scanInfo: M:B L:N SM:2 X-imss-tmaseResult: TT:1 TS:-19.3100 TC:1F TRN:70 TV:5.5.1026(15996.001) X-imss-scores: Clean:100.00000 C:0 M:0 S:0 R:0 X-imss-settings: Baseline:1 C:1 M:1 S:1 R:1 (0.0000 0.0000) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/180 X-Sequence-Number: 30530 "Also sprach Merlin Moncure:" > write back: raid controller can lie to host o/s. when o/s asks This is not what the linux software raid controller does, then. It does not queue requests internally at all, nor ack requests that have not already been acked by the components (modulo the fact that one can deliberately choose to have a slow component not be sync by allowing "write-behind" on it, in which case the "controller" will ack the incoming request after one of the compionents has been serviced, without waiting for both). > integrity and performance. 'write back' caching provides insane burst > IOPS (because you are writing to controller cache) and somewhat > improved sustained IOPS because the controller is reorganizing writes > on the fly in (hopefully) optimal fashion. This is what is provided by Linux file system and (ordinary) block device driver subsystem. It is deliberately eschewed by the soft raid driver, because any caching will already have been done above and below the driver, either in the FS or in the components. > > However the lack of extra buffering is really deliberate (double > > buffering is a horrible thing in many ways, not least because of the > > > completely unconvincing. But true. Therefore the problem in attaining conviction must be at your end. Double buffering just doubles the resources dedicated to a single request, without doing anything for it! It doubles the frequency with which one runs out of resources, it doubles the frequency of the burst limit being reached. It's deadly (deadlockly :) in the situation where the receiving component device also needs resources in order to service the request, such as when the transport is network tcp (and I have my suspicions about scsi too). > the overhead of various cache layers is > completely minute compared to a full fault to disk that requires a > seek which is several orders of magnitude slower. That's aboslutely true when by "overhead" you mean "computation cycles" and absolutely false when by overhead you mean "memory resources", as I do. Double buffering is a killer. > The linux software raid algorithms are highly optimized, and run on a I can confidently tell you that that's balderdash both as a Linux author and as a software RAID linux author (check the attributions in the kernel source, or look up something like "Raiding the Noosphere" on google). > presumably (much faster) cpu than what the controller supports. > However, there is still some extra oomph you can get out of letting > the raid controller do what the software raid can't...namely delay > sync for a time. There are several design problems left in software raid in the linux kernel. One of them is the need for extra memory to dispatch requests with and as (i.e. buffer heads and buffers, both). bhs should be OK since the small cache per device won't be exceeded while the raid driver itself serialises requests, which is essentially the case (it does not do any buffering, queuing, whatever .. and tries hard to avoid doing so). The need for extra buffers for the data is a problem. On different platforms different aspects of that problem are important (would you believe that on ARM mere copying takes so much cpu time that one wants to avoid it at all costs, whereas on intel it's a forgettable trivium). I also wouldn't aboslutely swear that request ordering is maintained under ordinary circumstances. But of course we try. Peter