X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 8D7249FA5D2 for ; Thu, 15 Jun 2006 20:58:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 68112-04 for ; Thu, 15 Jun 2006 20:58:02 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.203]) by postgresql.org (Postfix) with ESMTP id 2742B9FA160 for ; Thu, 15 Jun 2006 20:58:01 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id o1so514083nzf for ; Thu, 15 Jun 2006 16:58:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=uSSNuYrFbv0F08cTpLecRM5fsKoMFpxvCwCUGRiMl3WcLWqZWno+wJj2iFHneSbjQboB5qiGIzf5UmzRytuDU1beybm879bVQ2OPPCU4amBwCs4okS8Y6nFbdXKNLifBgQFOZXgdIU/InE5URyKfRqAP5QTs5iUt+Xfbx0pqY1w= Received: by 10.36.227.78 with SMTP id z78mr3225137nzg; Thu, 15 Jun 2006 16:58:00 -0700 (PDT) Received: by 10.37.18.45 with HTTP; Thu, 15 Jun 2006 16:58:00 -0700 (PDT) Message-ID: <33c6269f0606151658h731915d3k405b4da67c49228a@mail.gmail.com> Date: Thu, 15 Jun 2006 19:58:00 -0400 From: "Alex Turner" To: "Mark Lewis" Subject: Re: SAN performance mystery Cc: "Tom Lane" , "Brian Hurt" , "Tim Allen" , pgsql-performance@postgresql.org In-Reply-To: <1150413917.31200.109.camel@archimedes> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2392_12901501.1150415880430" References: <4491D61B.9040507@proximity.com.au> <4491D8DC.4070906@janestcapital.com> <1751.1150410284@sss.pgh.pa.us> <1150413917.31200.109.camel@archimedes> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/335 X-Sequence-Number: 19692 ------=_Part_2392_12901501.1150415880430 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Given the fact that most SATA drives have only an 8MB cache, and your RAID controller should have at least 64MB, I would argue that the system with the RAID controller should always be faster. If it's not, you're getting short-changed somewhere, which is typical on linux, because the drivers just aren't there for a great many controllers that are out there. Alex. On 6/15/06, Mark Lewis wrote: > > On Thu, 2006-06-15 at 18:24 -0400, Tom Lane wrote: > > I agree with Brian's suspicion that the SATA drive isn't properly > > fsync'ing to disk, resulting in bogusly high throughput. However, > > ISTM a well-configured SAN ought to be able to match even the bogus > > throughput, because it should be able to rely on battery-backed > > cache to hold written blocks across a power failure, and hence should > > be able to report write-complete as soon as it's got the page in cache > > rather than having to wait till it's really down on magnetic platter. > > Which is what the SATA drive is doing ... only it can't keep the promise > > it's making for lack of any battery backup on its on-board cache. > > It really depends on your SAN RAID controller. We have an HP SAN; I > don't remember the model number exactly, but we ran some tests and with > the battery-backed write cache enabled, we got some improvement in write > performance but it wasn't NEARLY as fast as an SATA drive which lied > about write completion. > > The write-and-fsync latency was only about 2-3 times better than with no > write cache at all. So I wouldn't assume that just because you've got a > write cache on your SAN, that you're getting the same speed as > fsync=off, at least for some cheap controllers. > > -- Mark Lewis > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > ------=_Part_2392_12901501.1150415880430 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Given the fact that most SATA drives have only an 8MB cache, and your RAID controller should have at least 64MB, I would argue that the system with the RAID controller should always be faster.  If it's not, you're getting short-changed somewhere, which is typical on linux, because the drivers just aren't there for a great many controllers that are out there.

Alex.

On 6/15/06, Mark Lewis <mark.lewis@mir3.com> wrote:
On Thu, 2006-06-15 at 18:24 -0400, Tom Lane wrote:
> I agree with Brian's suspicion that the SATA drive isn't properly
> fsync'ing to disk, resulting in bogusly high throughput.  However,
> ISTM a well-configured SAN ought to be able to match even the bogus
> throughput, because it should be able to rely on battery-backed
> cache to hold written blocks across a power failure, and hence should
> be able to report write-complete as soon as it's got the page in cache
> rather than having to wait till it's really down on magnetic platter.
> Which is what the SATA drive is doing ... only it can't keep the promise
> it's making for lack of any battery backup on its on-board cache.

It really depends on your SAN RAID controller.  We have an HP SAN; I
don't remember the model number exactly, but we ran some tests and with
the battery-backed write cache enabled, we got some improvement in write
performance but it wasn't NEARLY as fast as an SATA drive which lied
about write completion.

The write-and-fsync latency was only about 2-3 times better than with no
write cache at all.  So I wouldn't assume that just because you've got a
write cache on your SAN, that you're getting the same speed as
fsync=off, at least for some cheap controllers.

-- Mark Lewis

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

------=_Part_2392_12901501.1150415880430--