Re: performance on new linux box - Mailing list pgsql-performance

From Craig James
Subject Re: performance on new linux box
Date
Msg-id 4C363CAE.7010401@emolecules.com
Whole thread Raw
In response to Re: performance on new linux box  (Ryan Wexler <ryan@iridiumsuite.com>)
Responses Re: performance on new linux box  (<Timothy.Noonan@emc.com>)
List pgsql-performance
On 7/8/10 12:47 PM, Ryan Wexler wrote:
>
>
> On Thu, Jul 8, 2010 at 12:46 PM, Kevin Grittner
> <Kevin.Grittner@wicourts.gov <mailto:Kevin.Grittner@wicourts.gov>> wrote:
>
>     Ryan Wexler <ryan@iridiumsuite.com <mailto:ryan@iridiumsuite.com>>
>     wrote:
>
>      > One thing I don't understand is why BBU will result in a huge
>      > performance gain.  I thought BBU was all about power failures?
>
>     Well, it makes it safe for the controller to consider the write
>     complete as soon as it hits the RAM cache, rather than waiting for
>     persistence to the disk itself.  It can then schedule the writes in
>     a manner which is efficient based on the physical medium.
>
>     Something like this was probably happening on your non-server
>     machines, but without BBU it was not actually safe.  Server class
>     machines tend to be more conservative about not losing your data,
>     but without a RAID controller with BBU cache, that slows writes down
>     to the speed of the rotating disks.
>
>     -Kevin
>
> Thanks for the explanations that makes things clearer.  It still amazes
> me that it would account for a 5x change in IO.

It's not exactly a 5x change in I/O, rather it's a 5x change in *transactions*.  Without a BBU Postgres has to wait for
eachtransaction to by physically written to the disk, which at 7200 RPM (or 10K or 15K) means a few hundred per second.
Most of the time Postgres is just sitting there waiting for the disk to say, "OK, I did it."  With BBU, once the RAID
cardhas the data, it's virtually guaranteed it will get to the disk even if the power fails, so the RAID controller
says,"OK, I did it" even though the data is still in the controller's cache and not actually on the disk. 

It means there's no tight relationship between the disk's rotational speed and your transaction rate.

Craig

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Need help in performance tuning.
Next
From: Ryan Wexler
Date:
Subject: Re: performance on new linux box