Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 46077650F03 for ; Thu, 26 Jun 2008 14:27:36 -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 55154-02-9 for ; Thu, 26 Jun 2008 14:27:27 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.191]) by postgresql.org (Postfix) with ESMTP id 34D1D650F46 for ; Thu, 26 Jun 2008 14:26:04 -0300 (ADT) Received: by fk-out-0910.google.com with SMTP id e30so130549fke.3 for ; Thu, 26 Jun 2008 10:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=fp4TVXfNhbSma79X8Tor2/Y970pZ7MC2fnFkCblL/Sw=; b=hQQmqxg6QheekVOsWM+WNJFZ6F/Q8ec1uI+zirPDbsK2uxdL25WOe9qrja/PgDLCI5 n8P/LkgPfdRFLAgRUYqFEIcksi2rT2c9NnKV3AR5a/73dDNi8drWFmu0M8RkcMxeSby+ uG3oS5hm3qry14uU/M9wPaH9TXx7M2FE1uBz0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=T60VDxfqghvQfg+2z7zJuAygaeyPZEDz9mu84nVAF2OPQRYF/cXEzfaIAM7R///n0z QCwOQdsJHB0DuCLFslQxqdv6oP4049qAk981QxCggX2TVXiYfGTmPLUbNbb9d95yFtRY 79SRqon4aDjt1a7sPn1A7tnFDb/EPvUBeQGhI= Received: by 10.82.187.2 with SMTP id k2mr7473buf.55.1214501160360; Thu, 26 Jun 2008 10:26:00 -0700 (PDT) Received: by 10.82.147.4 with HTTP; Thu, 26 Jun 2008 10:26:00 -0700 (PDT) Message-ID: Date: Thu, 26 Jun 2008 13:26:00 -0400 From: "Merlin Moncure" To: ptb@inv.it.uc3m.es Subject: Re: Hardware vs Software RAID Cc: "Matthew Wakeling" , pgsql-performance@postgresql.org In-Reply-To: <200806261349.m5QDniN6026724@betty.it.uc3m.es> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200806261349.m5QDniN6026724@betty.it.uc3m.es> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/178 X-Sequence-Number: 30528 On Thu, Jun 26, 2008 at 9:49 AM, Peter T. Breuer wrote: > "Also sprach Merlin Moncure:" >> As discussed down thread, software raid still gets benefits of >> write-back caching on the raid controller...but there are a couple of > > (I wish I knew what write-back caching was!) hardware raid controllers generally have some dedicated memory for caching. the controllers can be configured in one of two modes: (the jargon is so common it's almost standard) write back: raid controller can lie to host o/s. when o/s asks controller to sync, controller can hold data in cache (for a time) write through: raid controller can not lie. all sync requests must pass through to disk The thinking is, the bbu on the controller can hold scheduled writes in memory (for a time) and replayed to disk when server restarts in event of power failure. This is a reasonable compromise between data 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 imposes a considerable extra resource burden. It's a mystery to me > 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. 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. The linux software raid algorithms are highly optimized, and run on a 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. merlin