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

From Ben Chobot
Subject Re: performance on new linux box
Date
Msg-id 61C79B98-EDA0-4F5C-B43C-C3387FD1D9C1@silentmedia.com
Whole thread Raw
In response to performance on new linux box  (Ryan Wexler <ryan@iridiumsuite.com>)
Responses Re: performance on new linux box
List pgsql-performance

On Jul 15, 2010, at 12:40 PM, Ryan Wexler wrote:

On Wed, Jul 14, 2010 at 7:50 PM, Ben Chobot <bench@silentmedia.com> wrote:
On Jul 14, 2010, at 6:57 PM, Scott Carey wrote:

> But none of this explains why a 4-disk raid 10 is slower than a 1 disk system.  If there is no write-back caching on the RAID, it should still be similar to the one disk setup.

Many raid controllers are smart enough to always turn off write caching on the drives, and also disable the feature on their own buffer without a BBU. Add a BBU, and the cache on the controller starts getting used, but *not* the cache on the drives.

Take away the controller, and most OS's by default enable the write cache on the drive. You can turn it off if you want, but if you know how to do that, then you're probably also the same kind of person that would have purchased a raid card with a BBU.
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Ben I don't quite follow your message.   Could you spell it out a little clearer for me?
thanks
-ryan


Most (all?) hard drives have cache built into them. Many raid cards have cache built into them. When the power dies, all the data in any cache is lost, which is why it's dangerous to use it for write caching. For that reason, you can attach a BBU to a raid card which keeps the cache alive until the power is restored (hopefully). But no hard drive I am aware of lets you attach a battery, so using a hard drive's cache for write caching will always be dangerous.

That's why many raid cards will always disable write caching on the hard drives themselves, and only enable write caching using their own memory when a BBU is installed. 

Does that make more sense?

pgsql-performance by date:

Previous
From: Ben Chobot
Date:
Subject: Re: performance on new linux box
Next
From: "Pierre C"
Date:
Subject: Re: Question of using COPY on a table with triggers